add "all" option for scanning all choicepoints master
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Sat, 13 Nov 2021 05:13:24 +0000 (16:13 +1100)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Sat, 13 Nov 2021 05:13:24 +0000 (16:13 +1100)
sss.sh

diff --git a/sss.sh b/sss.sh
index 4c2347cd0b1fdf4bbee27c0a744bccac3365a590..35b592530c5a7f48a71b47f32b342e937d15766a 100755 (executable)
--- a/sss.sh
+++ b/sss.sh
@@ -20,6 +20,8 @@ KEEPHH=12
 KEEPDD=15
 
 DEV=$1
+[ "$2" = "all" ] || LSCP="-s"
+
 if [ -z "$DEV" ] ; then
     DEVS=( $( mount | grep nilfs2 | sed 's/ .*//' ) )
     DEV=${DEVS[0]}
@@ -51,7 +53,7 @@ function marksnap() {
 { flock 9
 
   date "+$DEV: %Y-%m-%d %H:%M:%S ---- checking" >&2
-  lscp -s $DEV | while read CNO DATE TIME REST ; do
+  lscp $LSCP $DEV | while read CNO DATE TIME REST ; do
       TS="$DATE $TIME"
       [ "$CNO" = "CNO" ] && continue
       if [[ ! "$TS" > "$YEARLY" ]] ; then