Module Name:    src
Committed By:   alnsn
Date:           Sat Dec 29 00:52:11 UTC 2018

Modified Files:
        src/distrib/common: cgdroot.rc

Log Message:
Don't hardcode wd0a in cgdroot.kmod, try NAME=cgd.conf and ROOT.a.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 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.2
--- src/distrib/common/cgdroot.rc:1.1	Mon Jul 15 00:25:38 2013
+++ src/distrib/common/cgdroot.rc	Sat Dec 29 00:52:11 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: cgdroot.rc,v 1.1 2013/07/15 00:25:38 khorben Exp $
+#	$NetBSD: cgdroot.rc,v 1.2 2018/12/29 00:52:11 alnsn Exp $
 #
 # Copyright (c) 2013 Pierre Pronchery <khor...@defora.org>
 # All rights reserved.
@@ -36,8 +36,13 @@ export EDITOR
 
 umask 022
 
-mount -o ro /dev/wd0a /etc/cgd
-if [ $? -ne 0 ]; then
+mounted=
+for dev in NAME=cgd.conf ROOT.a ; do
+	if mount -o ro $dev /etc/cgd 2>/dev/null ; then
+		mounted=$dev
+	fi
+done
+if [ -z "$mounted" ]; then
 	echo "Could not mount the boot partition" 1>&2
 	exit 2
 fi

Reply via email to