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>
This commit is contained in:
Anthony G. Basile 2016-05-12 17:48:15 -04:00
parent 92e2f2c7cc
commit b3a04e797e

View File

@ -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 \