commit: b3a04e797e5e459842c2c239886ab6ea08a8dc29
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Thu May 12 21:48:15 2016 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Thu May 12 21:49:56 2016 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=b3a04e79
runlevels/Makefile: add support for runlevel ‘nonetwork’
Traditional System V reserves runlevel 2 for multiuser with no
networking. We add support for this which is already defined in
the inittab as
l2:2:wait:/sbin/rc nonetwork
X-Gentoo-Bug: 533828
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=533828
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
runlevels/Makefile | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/runlevels/Makefile b/runlevels/Makefile
index 682d6e1..df6b53a 100644
--- a/runlevels/Makefile
+++ b/runlevels/Makefile
@@ -3,6 +3,7 @@ include ../mk/net.mk
BOOT= bootmisc fsck hostname localmount loopback \
root swap swapfiles sysctl urandom ${BOOT-${OS}}
DEFAULT= local netmount
+NONETWORK= local
SHUTDOWN= savecache ${SHUTDOWN-${OS}}
SYSINIT= ${SYSINIT-${OS}}
@@ -10,6 +11,7 @@ LEVELDIR= ${DESTDIR}/${SYSCONFDIR}/runlevels
SYSINITDIR= ${LEVELDIR}/sysinit
BOOTDIR= ${LEVELDIR}/boot
DEFAULTDIR= ${LEVELDIR}/default
+NONETWORKDIR= ${LEVELDIR}/nonetwork
SHUTDOWNDIR= ${LEVELDIR}/shutdown
ifeq (${MKNET},yes)
@@ -72,6 +74,14 @@ install:
fi; \
ln -snf ${INITDIR}/"$$x" ${DEFAULTDIR}/"$$x" || exit
$$?; done \
fi
+ if ! test -d "${NONETWORKDIR}"; then \
+ ${INSTALL} -d ${NONETWORKDIR} || exit $$?; \
+ for x in ${NONETWORK}; do \
+ if test "${MKPREFIX}" = yes; then \
+ grep -q "keyword .*-prefix" ${INITFILES}/"$$x"
&& continue; \
+ fi; \
+ ln -snf ${INITDIR}/"$$x" ${NONETWORKDIR}/"$$x" || exit
$$?; done \
+ fi
if ! test -d "${SHUTDOWNDIR}"; then \
${INSTALL} -d ${SHUTDOWNDIR} || exit $$?; \
for x in ${SHUTDOWN}; do \