--- a/update-motd-fsck-at-reboot 2014-02-20 20:29:36.860712867 +0100 +++ c/update-motd-fsck-at-reboot 2014-02-20 20:29:36.860712867 +0100 @@ -59,13 +59,19 @@ if [ -n "$NEEDS_FSCK_CHECK" ]; then if [ "$check_interval" -gt 0 -a \ "$next_check_tstamp" -lt "$now" ]; then check_occur=yes fi if [ -n "$check_occur" ]; then check_occur_any=yes - echo "*** $part will be checked for errors at next reboot ***" + mountpoint=$(mount | grep "^$part" | cut -d ' ' -f 3) + pass=$(grep -v '^#' /etc/fstab | tr -s ' ' '\t' | cut -s -f 2,6 | grep -w "$mountpoint" | cut -f 2) + if [ "$pass" = "0" ]; then + echo "*** $part should be checked for errors ***" + else + echo "*** $part will be checked for errors at next reboot ***" + fi fi done if [ -n "$check_occur_any" ]; then echo "" fi } > $stamp