mirror of
https://github.com/theupriser/steamify-cachyos-live-iso.git
synced 2026-10-02 15:10:26 +02:00
fix: steamify-install mounts the new system's /var/log (@log) first, so its logs aren't hidden under the mount after boot
This commit is contained in:
1 parent
ca74e10eee
commit
faa57cdb7f
2 files changed
+14
No files matched your search
@@ -20,6 +20,17 @@ for id in ${choice//,/ }; do
|
||||
*) options+="${options:+,}$id" ;;
|
||||
esac
|
||||
done
|
||||
# /var/log is its own btrfs subvolume (@log) that the installer doesn't mount at $root/var/log: what is
|
||||
# written there now (these logs, Steamify's) would end up hidden under the mount after boot. Mount it
|
||||
# from the new system's fstab for this run.
|
||||
mounted_log=false
|
||||
if [[ -n "$root" && -d "$root/var/log" ]] && ! mountpoint -q "$root/var/log"; then
|
||||
read -r dev _ _ opts _ < <(awk '$2 == "/var/log" && $1 !~ /^#/' "$root/etc/fstab" 2>/dev/null)
|
||||
if [[ -n "${dev:-}" ]] && mount -o "$opts" "$dev" "$root/var/log" 2>/dev/null; then
|
||||
mounted_log=true
|
||||
trap '$mounted_log && umount "$root/var/log"' EXIT
|
||||
fi
|
||||
fi
|
||||
# systemd-boot: cachyos-installer runs `bootctl install` in a chroot, and bootctl leaves the EFI
|
||||
# variables alone there: no "Linux Boot Manager" boot entry, so the firmware tries the network and
|
||||
# its other entries first and finds the disk's fallback path last (or never). bootctl can't be made
|
||||
|
||||
Reference in new issue
Block a user