[[ $EUID == 0 ]] || exec sudo -E "$this_file" "$@"
set -e; . /usr/local/lib/bash-bear; set +e
+shopt -s nullglob
usage() {
cat <<EOF
if (( $# )); then
all_vols=( "$@" )
else
- all_vols=(q a o i ar qd qr)
+ all_vols=(q a o i qd qr)
+ ar_snaps=(/mnt/root/btrbk/ar.*)
+ if [[ -e /mnt/root/ar ]] || (( ${#ar_snaps[@]} > 0 )); then
+ all_vols+=(ar)
+ fi
fi
##### end command line parsing ########
$crypt_dev /a btrfs noatime,subvol=a$mopts 0 0
EOF
-shopt -s nullglob
# ssh and probably some other things care about parent directory
# ownership, and ssh doesn\'t allow any group writable parent