summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2023-10-27 10:42:17 +0200
committerJaron Kent-Dobias <jaron@kent-dobias.com>2023-10-27 10:42:17 +0200
commit7ddbe2aee8b968cbbdd2718190d687ee21b8de22 (patch)
treeb2bae01045a9de1f6e225782ee813e29e53f8112
parentf7706ab5a7a4e6fb4d8d91c32ec0009e37c49b0f (diff)
downloadprepare-lastboot-7ddbe2aee8b968cbbdd2718190d687ee21b8de22.tar.gz
prepare-lastboot-7ddbe2aee8b968cbbdd2718190d687ee21b8de22.tar.bz2
prepare-lastboot-7ddbe2aee8b968cbbdd2718190d687ee21b8de22.zip
Consistently name the EFI file.v1.1
-rw-r--r--prepare-lastboot10
1 files changed, 5 insertions, 5 deletions
diff --git a/prepare-lastboot b/prepare-lastboot
index c8139aa..951f906 100644
--- a/prepare-lastboot
+++ b/prepare-lastboot
@@ -15,22 +15,22 @@ if [ "$ROOT_FS" = "$BASE/$DEFAULT" ]; then
echo "sucessfully booted to $BASE/$DEFAULT, preparing lastboot"
# destroy the old lastboot file system and children
- zfs destroy -Rv "$BASE/$DEFAULT@lastboot"
+ zfs destroy -Rv "$BASE/$DEFAULT@$LASTBOOT"
# make a new lastboot file system
- zfs snap -r "$BASE/$DEFAULT@lastboot"
+ zfs snap -r "$BASE/$DEFAULT@$LASTBOOT"
for OLDFS in $(zfs list -rHo name -t filesystem "$BASE/$DEFAULT"); do
NEWFS=$(sed "s|^$BASE/$DEFAULT|$BASE/$LASTBOOT-$DEFAULT|" <<< $OLDFS)
echo "cloning $OLDFS to $NEWFS"
- zfs clone -o canmount=noauto -o mountpoint=none "$OLDFS@lastboot" "$NEWFS"
+ zfs clone -o canmount=noauto -o mountpoint=none "$OLDFS@$LASTBOOT" "$NEWFS"
done
zfs set mountpoint=/ "$BASE/$LASTBOOT-$DEFAULT"
# backup the current UKI
- echo "copying $UKI_NAME to lastboot.efi"
- cp "$EFI_DIR/EFI/Linux/$UKI_NAME" "$EFI_DIR/EFI/Linux/lastboot.efi"
+ echo "copying $UKI_NAME to $LASTBOOT-$DEFAULT.efi"
+ cp "$EFI_DIR/EFI/Linux/$UKI_NAME" "$EFI_DIR/EFI/Linux/$LASTBOOT-$DEFAULT.efi"
else
echo "not booted to $BASE/$DEFAULT, taking no action"
fi