aboutsummaryrefslogtreecommitdiff
path: root/runlevels
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2016-05-12 17:48:15 -0400
committerAnthony G. Basile <blueness@gentoo.org>2016-05-12 17:49:56 -0400
commitb3a04e797e5e459842c2c239886ab6ea08a8dc29 (patch)
treeb1322a67ecd3eb7208e998387d5e18a4a1c20b90 /runlevels
parent92e2f2c7cc958effcec0ef773dda954a153d8e42 (diff)
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@gentoo.org>
Diffstat (limited to 'runlevels')
-rw-r--r--runlevels/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/runlevels/Makefile b/runlevels/Makefile
index 682d6e15..df6b53a2 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 \