Module Name: src Committed By: martin Date: Fri Jan 11 15:37:28 UTC 2019
Modified Files: src/distrib/common [netbsd-8]: cgdroot.rc Log Message: Pull up following revision(s) (requested by sevan in ticket #1158): distrib/common/cgdroot.rc: revision 1.2 distrib/common/cgdroot.rc: revision 1.3 distrib/common/cgdroot.rc: revision 1.4 Don't hardcode wd0a in cgdroot.kmod, try NAME=cgd.conf and ROOT.a. - Break the loop after a successful mount. - ROOT.a doesn't resolve to a useful partition, hardcode wd0a and ld0a for now. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.24.1 src/distrib/common/cgdroot.rc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/common/cgdroot.rc diff -u src/distrib/common/cgdroot.rc:1.1 src/distrib/common/cgdroot.rc:1.1.24.1 --- src/distrib/common/cgdroot.rc:1.1 Mon Jul 15 00:25:38 2013 +++ src/distrib/common/cgdroot.rc Fri Jan 11 15:37:28 2019 @@ -1,4 +1,4 @@ -# $NetBSD: cgdroot.rc,v 1.1 2013/07/15 00:25:38 khorben Exp $ +# $NetBSD: cgdroot.rc,v 1.1.24.1 2019/01/11 15:37:28 martin Exp $ # # Copyright (c) 2013 Pierre Pronchery <khor...@defora.org> # All rights reserved. @@ -36,8 +36,14 @@ export EDITOR umask 022 -mount -o ro /dev/wd0a /etc/cgd -if [ $? -ne 0 ]; then +mounted= +for dev in NAME=cgd.conf /dev/wd0a /dev/ld0a ; do + if mount -o ro $dev /etc/cgd 2>/dev/null ; then + mounted=$dev + break + fi +done +if [ -z "$mounted" ]; then echo "Could not mount the boot partition" 1>&2 exit 2 fi