Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/common Don't hardcode wd0a in cgdroot.kmod, try NAME...
details: https://anonhg.NetBSD.org/src/rev/8d09ea86f234
branches: trunk
changeset: 447034:8d09ea86f234
user: alnsn <alnsn%NetBSD.org@localhost>
date: Sat Dec 29 00:52:11 2018 +0000
description:
Don't hardcode wd0a in cgdroot.kmod, try NAME=cgd.conf and ROOT.a.
diffstat:
distrib/common/cgdroot.rc | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (25 lines):
diff -r e7a011684a2a -r 8d09ea86f234 distrib/common/cgdroot.rc
--- a/distrib/common/cgdroot.rc Sat Dec 29 00:35:21 2018 +0000
+++ b/distrib/common/cgdroot.rc Sat Dec 29 00:52:11 2018 +0000
@@ -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 <khorben%defora.org@localhost>
# All rights reserved.
@@ -36,8 +36,13 @@
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
Home |
Main Index |
Thread Index |
Old Index