-
-# set default mountpoints
-case $HOSTNAME in
- # no remote backups atm. note, if we do enable this, configuration below will need some changes.
- # frodo)
- # prospective_mps=(/i)
- # ;;
- *)
- prospective_mps=(/a /q)
- if [[ $HOSTNAME == "$MAIL_HOST" ]]; then
- prospective_mps+=(/o)
+if [[ $mountpoints ]]; then
+ for mp in ${mountpoints[@]}; do # default mountpoints to sync
+ if [[ -e /nocow/btrfs-stale/$mp ]]; then
+ echo "$0: error: $mp is stale, mount-latest-subvol first"
+ exit 1
+ fi
+ done
+else
+ # set default mountpoints
+ case $HOSTNAME in
+ # no remote backups atm. note, if we do enable this, configuration below will need some changes.
+ # frodo)
+ # prospective_mps=(/i)
+ # ;;
+ *)
+ prospective_mps=(/a /q)
+ if [[ $HOSTNAME == "$MAIL_HOST" ]]; then
+ prospective_mps+=(/o)
+ fi
+ ;;
+ esac
+ for mp in ${prospective_mps[@]}; do # default mountpoints to sync
+ if [[ -e /nocow/btrfs-stale/$mp ]]; then
+ echo "$0: warning: $mp stale, not adding to default mountpoints"
+ continue