>Number: 158127
>Category: conf
>Synopsis: [patch] remount_optional option in rc.initdiskless doesn't
>actually work
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Jun 21 16:00:22 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Brian Olsen
>Release: 8.2
>Organization:
>Environment:
FreeBSD mail.vagtelhave.dk 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Tue Jun 21
07:23:33 CEST 2011
[email protected]:/usr/obj/freakbsd.lacuna/usr/src/sys/GENERIC
i386
>Description:
When trying to use the remount_optional option on a nanobsd like build that was
going to run from an iso image with an optional remount of /dev/ufs/cfg onto
/conf/default/etc I discovered that it doesn't actually work.
When remount_optional is present it will always print the error message "mount
-o ro /dev/ufs/cfg /conf/default/etc failed: ignoring due to remount_optional"
even when the mount succeeds. And when the mount fails it still drops into a
shell.
A simple fix to the problem is attached.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
--- /etc/rc.initdiskless 2011-02-18 02:52:09.000000000 +0100
+++ etc/rc.initdiskless 2011-06-21 17:15:21.000000000 +0200
@@ -166,14 +166,17 @@
chkerr() {
lastitem () ( n=$(($# - 1)) ; shift $n ; echo $1 )
mountpoint="$(lastitem $2)"
- [ -r $mountpoint/remount_optional ] && ( echo "$2 failed: ignoring due to
remount_optional" ; return )
case $1 in
0)
;;
*)
- echo "$2 failed: dropping into /bin/sh"
- /bin/sh
- # RESUME
+ if [ -r $mountpoint/remount_optional ] ; then
+ echo "$2 failed: ignoring due to remount_optional"
+ else
+ echo "$2 failed: dropping into /bin/sh"
+ /bin/sh
+ # RESUME
+ fi
;;
esac
}
>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"