fixes and qd for better source subvol error repo
[distro-setup] / mount-latest-subvol
index 099c38f78f88eb85ad19de2a7864513d394b3453..bfe99f9a75e2091ae1d9df4bee75662abdf112c0 100644 (file)
@@ -171,7 +171,7 @@ done
 if (( $# )); then
   all_vols=( "$@" )
 else
-  all_vols=(q a o i ar qr)
+  all_vols=(q a o i ar qd qr)
 fi
 
 ##### end command line parsing ########
@@ -242,6 +242,7 @@ fa=(/mnt/root/btrbk/q.*); f=${fa[0]}
 if [[ -e $f ]]; then
   fstab <<EOF
 $crypt_dev  /q  btrfs  noatime,subvol=q,gid=1000$mopts  0 0
+$crypt_dev  /qd  btrfs  noatime,subvol=qd,gid=1000$mopts  0 0
 /q/p  /p  none  bind$mopts  0 0
 EOF
 fi
@@ -381,7 +382,7 @@ for vol in ${all_vols[@]}; do
   ### end getting root_dir
 
   cd $root_dir
-  if [[ -e $vol ]]; then
+  if [[ -e $vol && $vol != qd ]]; then
     leaf=$vol.leaf.$(date +%Y-%m-%dT%H:%M:%S%z)
     m mv $vol $leaf
     m btrfs property set -ts $leaf ro true