Help with fsck and tune2fs
This commit is contained in:
24
scripts/fsck-help.sh
Executable file
24
scripts/fsck-help.sh
Executable file
@@ -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 <disk-device>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
show $1
|
||||||
Reference in New Issue
Block a user