mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
integrate-distro.sh: Add support for /dev/loopXXX
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
ff664c6804
commit
2366ce571c
1 changed files with 17 additions and 3 deletions
|
|
@ -473,7 +473,8 @@ get_opts()
|
|||
shift
|
||||
;;
|
||||
-w)
|
||||
cwd=$2
|
||||
cwd="$2"
|
||||
cd "$cwd"
|
||||
shift
|
||||
;;
|
||||
-s)
|
||||
|
|
@ -499,6 +500,12 @@ log()
|
|||
echo $@ >&2
|
||||
}
|
||||
|
||||
fatal()
|
||||
{
|
||||
log $@
|
||||
exit 1
|
||||
}
|
||||
|
||||
run()
|
||||
{
|
||||
local exit_on_error=0
|
||||
|
|
@ -1297,8 +1304,13 @@ fi
|
|||
|
||||
if [ "$install_dev" ]; then
|
||||
|
||||
tmp=`realpath "$install_dev"`
|
||||
[ -b "$tmp" ] || fatal "device \"$install_dev\" is not a link to a block device"
|
||||
install_dev="$tmp"
|
||||
|
||||
case $install_dev in
|
||||
/dev/sd*) part_sep="";;
|
||||
/dev/loop*) part_sep="";;
|
||||
/dev/nbd*) part_sep="p";;
|
||||
esac
|
||||
|
||||
|
|
@ -1314,9 +1326,11 @@ if [ "$install_dev" ]; then
|
|||
/dev/sde) install_grub_dev_num=4;;
|
||||
/dev/nbd*)
|
||||
install_grub_dev_num=${d/\/dev\/nbd/};;
|
||||
/dev/loop*)
|
||||
install_grub_dev_num=0;;
|
||||
*)
|
||||
log "device \"$install_dev\" can't be mapped onto a grub device number, edit $myname to add support"
|
||||
exit 1;;
|
||||
fatal "device \"$install_dev\" can't be mapped onto a grub device number, edit $myname to add support"
|
||||
;;
|
||||
esac
|
||||
|
||||
run_dev=/dev/sda
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue