X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=debian%2Felilo.sh;h=faff78bf7b3d386125c5351c86c7c1cd88dc2b69;hb=22d395c928749a75cc7b98425f5173634938d30c;hp=df78c64eed2a2a38f7c7a6236306da5360098a95;hpb=2344eb51e123a29ed29ed03e6b4d56190d8d7c43;p=debian%2Felilo diff --git a/debian/elilo.sh b/debian/elilo.sh index df78c64..faff78b 100644 --- a/debian/elilo.sh +++ b/debian/elilo.sh @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash ############################################################################### ## @@ -38,7 +38,7 @@ TARGET= EFIROOT=/EFI/debian export LC_COLLATE=C -ARCHITECTURE=$(dpkg --print-installation-architecture) +ARCHITECTURE=$(dpkg --print-architecture) ## catch signals, clean up junk in /tmp. trap "cleanup" 0 @@ -215,7 +215,6 @@ checkconf() if [ -L "$boot" ] ; then oldboot=$boot boot=$(readlink -f $oldboot) - echo 1>&2 "$PRG: $oldboot is a symbolic link, using $boot instead" fi if [ ! -e "$boot" ] ; then echo 1>&2 "$PRG: $boot: No such file or directory" @@ -346,7 +345,7 @@ mnt() fi [ "$VERBOSE" = 1 ] && echo "$PRG: Mounting $boot..." - mount -t "$fstype" -o codepage=437,iocharset=iso8859-1,rw,noexec,umask=077$loop "$boot" "$TMP/bootstrap.$$" + mount -t "$fstype" -o codepage=437,rw,noexec,umask=077$loop "$boot" "$TMP/bootstrap.$$" if [ $? != 0 ] ; then echo 1>&2 "$PRG: An error occured mounting $boot" return 1 @@ -364,6 +363,8 @@ copyfiles() sed 's/^image[[:space:]]*=[[:space:]]*//' | grep -v ':'` initrdfiles=`grep '^[[:space:]]*initrd[[:space:]]*=' $bootconf | \ sed 's/.*=[[:space:]]*//' | grep -v ':'` + vmmfiles=`grep '^[[:space:]]*vmm[[:space:]]*=' $bootconf | \ + sed 's/.*=[[:space:]]*//' | grep -v ':'` ## Point of no return, removing the old EFI/debian tree rm -rf $TARGET/$EFIROOT @@ -398,6 +399,7 @@ recreated every time elilo runs. Any local changes will be lost.\n\ -e "s|\t| |g" \ -e "s|\(^image[[:space:]]*=[[:space:]]*\)\([^:]*\)$|\1$EFIROOT\2|" \ -e "s|\(^[[:space:]]*initrd[[:space:]]*=[[:space:]]*\)\([^:]*\)$|\1$EFIROOT\2|" \ + -e "s|\(^[[:space:]]*vmm[[:space:]]*=[[:space:]]*\)\([^:]*\)$|\1$EFIROOT\2|" \ < "$bootconf" > "$TARGET/$EFIROOT/$CFFILE" if [ $? != 0 ] ; then echo 1>&2 "$PRG: An error occured while writing to $boot" @@ -406,7 +408,7 @@ recreated every time elilo runs. Any local changes will be lost.\n\ [ "$DEBUG" = 1 ] && echo "----" && cat "$TARGET/$EFIROOT/$CFFILE" && echo "----" - for i in $imagefiles $initrdfiles; do + for i in $imagefiles $initrdfiles $vmmfiles; do [ "$VERBOSE" = 1 ] && echo "$PRG: Installing $i on $boot..." if [ -f $i ]; then mkdir -p `dirname "$TARGET/$EFIROOT/$i"` @@ -575,7 +577,9 @@ chkspace() sed 's/^image[[:space:]]*=[[:space:]]*//' | grep -v ':'` initrdfiles=`grep '^[[:space:]]*initrd[[:space:]]*=' $bootconf | \ sed 's/.*=[[:space:]]*//' | grep -v ':'` - bytesneeded=`cat $imagefiles $initrdfiles $install $bootconf 2>/dev/null | wc -c` + vmmfiles=`grep '^[[:space:]]*vmm[[:space:]]*=' $bootconf | \ + sed 's/.*=[[:space:]]*//' | grep -v ':'` + bytesneeded=`cat $imagefiles $initrdfiles $vmmfiles $install $bootconf 2>/dev/null | wc -c` # convert to KB, allowing 5% overhead kbneeded=$(( bytesneeded / 1024 + bytesneeded / 20480 )) kbavailable=$(df -P -k $TARGET | sed -n "s|^$boot[[:space:]]\+[0-9]\+[[:space:]]\+[0-9]\+[[:space:]]\+\([0-9]\+\).*$|\1|p")