4 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
8 # we could just as well check if last_boot != /debianstable_boostrap
9 # the intent with this one is just a little clearer.
10 if [[ $did_fai_check == true
]]; then
12 pxe-kexec
-n --ignore-whitelist -l fai-generated faiserver ||
:
19 for dev
in $
(btrfs
fi show
/ |
sed -rn 's#^\s*devid\s.*\s([^0-9 ]+)\S+$#\1#p' \
24 if [[ -e /mnt
/grubenv
]]; then
25 source <(grub-editenv
/mnt
/grubenv list
)
30 # we make sure there is only 1 grubenv,
31 # so grub can just find the first one, in whatever order
32 # if looks at them, which may not be the same as us.
33 # If the disk dies, we just lose the default boot option,
34 # we will have to do manual steps to replace it anyways.
40 if $fai_check && [[ $last_boot != /debianstable_boostrap
]]; then
41 # no need to reboot if we actually want to boot into this os.