From a5e2f37b751af7d35ce972bd7eb9a7eb8315ce8b Mon Sep 17 00:00:00 2001 From: Tommy Date: Fri, 5 Jul 2024 08:30:29 -0700 Subject: [PATCH] No longer hardcode date Signed-off-by: Tommy --- install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 45186cb..1e0f256 100644 --- a/install.sh +++ b/install.sh @@ -22,6 +22,8 @@ unpriv(){ sudo -u nobody "$@" } +installation_date=$(date "+%Y-%m-%d %H:%M:%S") + # Check if this is a VM virtualization=$(systemd-detect-virt) @@ -266,15 +268,14 @@ fi ## Set the default BTRFS Subvol to Snapshot 1 before pacstrapping btrfs subvolume set-default "$(btrfs subvolume list /mnt | grep "@/.snapshots/1/snapshot" | grep -oP '(?<=ID )[0-9]+')" /mnt -## Temporarily hardcode the date here, will make it work with proper date later. -echo ' +echo " single 1 - 1999-03-31 0:00:00 + ${installation_date} First Root Filesystem number -' > /mnt/@/.snapshots/1/info.xml +" > /mnt/@/.snapshots/1/info.xml chmod 600 /mnt/@/.snapshots/1/info.xml