X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=mount-latest-subvol;h=7f54a4c2cfd9c958647dbc68039469df2e59c1ef;hb=b28eebdf9143aa17733f233b30b96f462008f3b6;hp=894ece520546cf9b099072ba00327df8b12ea5b0;hpb=12cab163424e3a7b0815646d1d4407f9b5839bcb;p=distro-setup diff --git a/mount-latest-subvol b/mount-latest-subvol index 894ece5..7f54a4c 100644 --- a/mount-latest-subvol +++ b/mount-latest-subvol @@ -308,10 +308,11 @@ for vol in q a o i; do continue fi - if [[ $vol == q ]]; then - # allow to fail, user might not be logged in - x sudo -u $(id -nu 1000) XDG_RUNTIME_DIR=/run/user/1000 systemctl --user stop arbtt ||: - fi + ## not using arbtt at the moment + # if [[ $vol == q ]]; then + # ## allow to fail, user might not be logged in + # x sudo -u $(id -nu 1000) XDG_RUNTIME_DIR=/run/user/1000 systemctl --user stop arbtt ||: + # fi umount_ret=true unmounted=() for dir in $(echo $d ${binds[*]}\ |tac -s\ ); do @@ -408,8 +409,8 @@ for vol in q a o i; do ## begin expire leaf vols ## leaf_vols=($vol.leaf.*) count=${#leaf_vols[@]} - leaf_limit_time=$(( $(date +%s) - 60*60*24*60 )) # 60 days - leaf_new_limit_time=$(( $(date +%s) - 60*60*24 )) # 1 day + leaf_limit_time=$(( EPOCHSECONDS - 60*60*24*60 )) # 60 days + leaf_new_limit_time=$(( EPOCHSECONDS - 60*60*24 )) # 1 day # this goes backwards from oldest. leaf_new_limit_time is just in case # the order gets screwed up or something. for leaf in ${leaf_vols[@]}; do @@ -430,17 +431,20 @@ for vol in q a o i; do for dir in $d ${binds[@]}; do m mnt $dir done - if [[ $vol == q ]]; then - # maybe this will fail if X is not running - x sudo -u $(id -nu 1000) XDG_RUNTIME_DIR=/run/user/1000 systemctl --user start arbtt ||: - fi + + ## arbtt disabled for now + # if [[ $vol == q ]]; then + # # maybe this will fail if X is not running + # x sudo -u $(id -nu 1000) XDG_RUNTIME_DIR=/run/user/1000 systemctl --user start arbtt ||: + # fi + stale_dir=/nocow/btrfs-stale rm -f $stale_dir/$d done -for dir in /mnt/r7/amy/{root,boot}_ubuntubionic /mnt/{root2/root,boot2/boot}_ubuntubionic; do +for dir in /mnt/r7/amy/{root/root,boot/boot}_ubuntubionic /mnt/{root2/root,boot2/boot}_ubuntubionic; do vol=${dir##*/} root_dir=${dir%/*} if [[ ! -d $root_dir ]]; then