system.fileSystems.rollingRootFs: make old rootfs readonly

This commit is contained in:
陈浩南 2023-10-01 19:15:32 +08:00
parent 78b27d3ae5
commit e832412f3b

View File

@ -237,6 +237,7 @@ inputs:
if [ -f /mnt${path}/current/.timestamp ]
then
mv /mnt${path}/current /mnt${path}/$(cat /mnt${path}/current/.timestamp)
btrfs property set -ts /mnt${path}/$(cat /mnt${path}/current/.timestamp) ro true
fi
btrfs subvolume create /mnt${path}/current
echo $(date '+%Y%m%d%H%M%S') > /mnt${path}/current/.timestamp