Bug 134250 - rc.d/mountlate: bogus error message when using nested late mounts
Summary: rc.d/mountlate: bogus error message when using nested late mounts
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 8.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-rc (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2009-05-06 01:10 UTC by Dmitry Marakasov
Modified: 2018-08-12 15:22 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Marakasov freebsd_committer 2009-05-06 01:10:02 UTC
On some configs it's possible that bogus error from mount is displayed during boot.

The bug shows when there are nested late mounts, i.e.

/dev/ad8d /mnt         ufs rw,late 0 0
/dev/ad8e /mnt/somedir ufs rw,late 0 0

Here's what mount -d -a -l shows in this case:

# mount -d -a -l
mount -t ufs -o rw -o noatime -o update /dev/ad8a /
mount -t ufs -o rw /dev/ad8d /mnt
mount: /mnt/somedir: No such file or directory

True, as /mnt/somedir does not exists unless /dev/ad8d is mounted.

That mount -d -a -l is called from /etc/rc.d/mountlate:

	latefs="`/sbin/mount -d -a -l | grep -v ' /$'`"

thus that error gets into boot output - it confused me badly, though it turned out to be harmless.

Fix: 

Obvious fix is:

-	latefs="`/sbin/mount -d -a -l | grep -v ' /$'`"
+	latefs="`/sbin/mount -d -a -l 2>&1 | grep -v ' /$'`"
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:24 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped