aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/build.sh b/build.sh
index 59dea31..e6d7111 100755
--- a/build.sh
+++ b/build.sh
@@ -266,6 +266,11 @@ cp "$CUSTOM_DIR/zz-grub-zfs-snap.hook" "$PROFILE_DIR/airootfs/usr/local/share/gr
info "Copying zfs-snap-prune..."
cp "$CUSTOM_DIR/zfs-snap-prune" "$PROFILE_DIR/airootfs/usr/local/bin/"
+# Copy zfssnapshot and zfsrollback for ZFS management
+info "Copying zfssnapshot and zfsrollback..."
+cp "$CUSTOM_DIR/zfssnapshot" "$PROFILE_DIR/airootfs/usr/local/bin/"
+cp "$CUSTOM_DIR/zfsrollback" "$PROFILE_DIR/airootfs/usr/local/bin/"
+
# Copy example config for unattended installs
mkdir -p "$PROFILE_DIR/airootfs/root"
cp "$CUSTOM_DIR/install-archzfs.conf.example" "$PROFILE_DIR/airootfs/root/"
@@ -293,6 +298,12 @@ if grep -q "file_permissions=" "$PROFILE_DIR/profiledef.sh"; then
/)/ i\ ["/usr/local/bin/zfs-snap-prune"]="0:0:755"
}' "$PROFILE_DIR/profiledef.sh"
sed -i '/^file_permissions=(/,/)/ {
+ /)/ i\ ["/usr/local/bin/zfssnapshot"]="0:0:755"
+ }' "$PROFILE_DIR/profiledef.sh"
+ sed -i '/^file_permissions=(/,/)/ {
+ /)/ i\ ["/usr/local/bin/zfsrollback"]="0:0:755"
+ }' "$PROFILE_DIR/profiledef.sh"
+ sed -i '/^file_permissions=(/,/)/ {
/)/ i\ ["/etc/shadow"]="0:0:400"
}' "$PROFILE_DIR/profiledef.sh"
fi