diff --git a/WHATS_NEW b/WHATS_NEW index b080742f3..093fd40eb 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.75 - ===================================== + Better support of noninteractive shell execution of fsadm. Fix usage of --yes flag for ReiserFS resize in fsadm. Fix detection of mounted filesystems for fsadm when udev is used. Fix assignment of default value to LVM variable is fsadm. diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh index 7449b3343..c1e8fb182 100644 --- a/scripts/fsadm.sh +++ b/scripts/fsadm.sh @@ -368,7 +368,11 @@ check() { detect_mounted && error "Cannot fsck device \"$VOLUME\", filesystem is mounted on $MOUNTED" case "$FSTYPE" in "xfs") dry $XFS_CHECK "$VOLUME" ;; - *) dry $FSCK $YES "$VOLUME" ;; + *) # check if executed from interactive shell environment + case "$-" in + *i*) dry $FSCK $YES $FORCE "$VOLUME" ;; + *) dry $FSCK $FORCE -p "$VOLUME" ;; + esac esac }