X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Ffiles%2Fboot%2Fchboot%2FDEFAULT;h=8a093d9e32287de91e36266bd87bcb65fae7fc3f;hb=da61a304a10de72288782a9d872769fe44576f50;hp=a8aa58497c386e94d3f5c676191530b56d520c49;hpb=cf778f7a65037a2a54e2b6008511f0a584326ce9;p=automated-distro-installer diff --git a/fai/config/files/boot/chboot/DEFAULT b/fai/config/files/boot/chboot/DEFAULT index a8aa584..8a093d9 100755 --- a/fai/config/files/boot/chboot/DEFAULT +++ b/fai/config/files/boot/chboot/DEFAULT @@ -16,8 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -set -eE -o pipefail -trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR +x="$(readlink -f "$BASH_SOURCE")"; source "${x%/*}/bash-trace" [[ $EUID == 0 ]] || exec sudo "$BASH_SOURCE" "$@" @@ -93,8 +92,8 @@ fi #### begin initial error checking ##### -if ! btrfs subvolume list $mnt | grep "_$distro$" &>/dev/null; then - echo "$0: error: _$distro$ not found in btrfs subvolume list $mnt:" +if ! btrfs subvolume list $mnt | grep "$distro$" &>/dev/null; then + echo "$0: error: $distro not found in btrfs subvolume list $mnt:" btrfs subvolume list $mnt exit 1 fi @@ -119,7 +118,7 @@ e grub-bios-setup -d $mount_point/grub/i386-pc -s -m $mount_point/grub/device.ma e umount $mount_point e mount $boot_disk$grub_extn $mount_point -e grub-editenv $mount_point/grubenv set last_boot=$distro +e grub-editenv $mount_point/grubenv set last_boot=/$distro e grub-editenv $mount_point/grubenv set did_fai_check=true e umount $mount_point e rmdir $mount_point