fs-lib/fs-lib.sh: skip fsck for xfs and btrfs. remount is enough
parent
47057875e7
commit
1594d0bf9c
|
|
@ -32,15 +32,17 @@ fsck_tail() {
|
||||||
# note: this function sets _drv of the caller
|
# note: this function sets _drv of the caller
|
||||||
fsck_able() {
|
fsck_able() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
xfs) {
|
xfs)
|
||||||
type xfs_db &&
|
# {
|
||||||
type xfs_repair &&
|
# type xfs_db &&
|
||||||
type xfs_check &&
|
# type xfs_repair &&
|
||||||
type mount &&
|
# type xfs_check &&
|
||||||
type umount
|
# type mount &&
|
||||||
} >/dev/null 2>&1 &&
|
# type umount
|
||||||
_drv="_drv=none fsck_drv_xfs" &&
|
# } >/dev/null 2>&1 &&
|
||||||
return 0
|
# _drv="_drv=none fsck_drv_xfs" &&
|
||||||
|
# return 0
|
||||||
|
return 1
|
||||||
;;
|
;;
|
||||||
ext?)
|
ext?)
|
||||||
type e2fsck >/dev/null 2>&1 &&
|
type e2fsck >/dev/null 2>&1 &&
|
||||||
|
|
@ -58,9 +60,10 @@ fsck_able() {
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
btrfs)
|
btrfs)
|
||||||
type btrfsck >/dev/null 2>&1 &&
|
# type btrfsck >/dev/null 2>&1 &&
|
||||||
_drv="_drv=none fsck_drv_btrfs" &&
|
# _drv="_drv=none fsck_drv_btrfs" &&
|
||||||
return 0
|
# return 0
|
||||||
|
return 1
|
||||||
;;
|
;;
|
||||||
nfs*)
|
nfs*)
|
||||||
# nfs can be a nop, returning success
|
# nfs can be a nop, returning success
|
||||||
|
|
@ -89,7 +92,6 @@ fsck_drv_btrfs() {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# common code for checkers that follow usual subset of options and return codes
|
# common code for checkers that follow usual subset of options and return codes
|
||||||
fsck_drv_com() {
|
fsck_drv_com() {
|
||||||
local _ret
|
local _ret
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue