diff --git a/scripts/fsck-help.sh b/scripts/fsck-help.sh new file mode 100755 index 0000000..227b71f --- /dev/null +++ b/scripts/fsck-help.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# https://unixadminguide.blogspot.com/2013/12/how-to-disable-fsck-on-reboot-in-linux.html +# +# tune2fs: +# -l -> list +# -c max-mount-counts, 0 or -1 -> disabled +# -i interval-between-checks[d|m|w] , 0 -> disabled + +set -E -o errexit -o nounset -o pipefail + +readonly SCRIPT_NAME=$(basename "${BASH_SOURCE[0]}") + +function show() { + local device=$1 + tune2fs -l $device | egrep -i 'mount count|check' | egrep -i -v checksum +} + +if [[ $# -lt 1 ]]; then + echo "use: $SCRIPT_NAME " + exit 1 +fi + +show $1