X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;ds=sidebyside;f=sss.sh;h=35b592530c5a7f48a71b47f32b342e937d15766a;hb=f8f64a4df8a634ea536608edb20cb5000de8f286;hp=4c2347cd0b1fdf4bbee27c0a744bccac3365a590;hpb=d6fc08311a092f201086078482c71d62fc728410;p=rrq%2Fnilfs2sss.git diff --git a/sss.sh b/sss.sh index 4c2347c..35b5925 100755 --- 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