various changes around data volumes
[distro-setup] / check-subvol-stale
index d9582286126696086ebf425997270a936210d3d7..7d36b461bcf269a67dbceeed6b2c420f06a403da 100644 (file)
@@ -7,6 +7,10 @@ trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
 
 shopt -s nullglob
 
+if [[ ! $@ ]]; then
+    echo "$0: error: expected mountpoint argument"
+fi
+
 ret=0
 for d; do
     vol=${d##*/}
@@ -53,7 +57,3 @@ for d; do
 done
 exit $ret
 
-# todo: figure out what to do when there are no
-# snapshots yet. I guess that should be
-# yes to being stale? see the implications
-# in the other script.