Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: nanobsd/Files/usr/local/sbin/scrub
- ===================================================================
- --- nanobsd/Files/usr/local/sbin/scrub (revision 10055)
- +++ nanobsd/Files/usr/local/sbin/scrub (working copy)
- @@ -35,7 +35,7 @@
- {
- cat<<-__EOF__
- - usage: $0 -p <pool> [<options>]
- + usage: $0 [<options>] pool
- Where options is:
- -t Threshold days between scrubs
- __EOF__
- @@ -50,12 +50,9 @@
- local rc=0
- local _last_scrub _scrub_diff _status pool
- - while getopts "p:t:" opt
- + while getopts "t:" opt
- do
- case "${opt}" in
- - p)
- - pool=${OPTARG}
- - ;;
- t)
- threshold=${OPTARG}
- ;;
- @@ -66,11 +63,15 @@
- esac
- done
- - if [ -z "${pool}" ]; then
- + shift $(( $OPTIND - 1 ))
- +
- + if [ $# -ne 1 ]; then
- usage "${opts}"
- return 2
- fi
- + pool=$1
- +
- # Piece of code based on 800.scrub-zfs from periodic
- _last_scrub=$(zpool history ${pool} | \
- egrep "^[0-9\.\:\-]{19} zpool scrub ${pool}\$" | tail -1 |\
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement