diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2012-07-10 01:59:28 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2012-07-10 02:39:36 -0500 |
commit | 60d6847de553970a80207fde6bd46f5f3696e049 (patch) | |
tree | bcfd39c21b9300c55efb5f57e1d92f93fbdca8b1 | |
parent | ecb4d7c3f2b5ff7588a288d24c0dd462012a0389 (diff) |
add the MKNET variable to select a network stack
The MKNET variable can be used to select the network stack you want to
build and install with OpenRC.
The current default is the gentoo "oldnet" stack. If you want to install
the OpenRC newnet stack, use MKNET=newnet on the make command line.
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | conf.d/Makefile | 6 | ||||
-rw-r--r-- | init.d/Makefile | 16 | ||||
-rw-r--r-- | runlevels/Makefile | 14 |
5 files changed, 26 insertions, 15 deletions
@@ -7,8 +7,7 @@ include Makefile.inc SUBDIR= conf.d etc init.d local.d man scripts sh src sysctl.d # Build our old net foo or not -MKOLDNET?= yes -ifeq (${MKOLDNET},yes) +ifeq (${MKNET},) SUBDIR+= net doc endif @@ -10,13 +10,13 @@ You may wish to tweak the installation with the below arguments PROGLDFLAGS=-static LIBNAME=lib64 DESTDIR=/tmp/openrc-image +MKNET=newnet MKPAM=pam MKPKGCONFIG=no MKSELINUX=yes MKSTATICLIBS=no MKTERMCAP=ncurses MKTERMCAP=termcap -MKOLDNET=no PKG_PREFIX=/usr/pkg LOCAL_PREFIX=/usr/local PREFIX=/usr/local diff --git a/conf.d/Makefile b/conf.d/Makefile index d5f85c30..412efae6 100644 --- a/conf.d/Makefile +++ b/conf.d/Makefile @@ -1,9 +1,11 @@ DIR= ${CONFDIR} -CONF= bootmisc fsck hostname localmount network staticroute urandom \ - ${CONF-${OS}} +CONF= bootmisc fsck hostname localmount urandom ${CONF-${OS}} +ifeq (${MKNET},newnet) +CONF+= network staticroute TARGETS+= network staticroute CLEANFILES+= network staticroute +endif MK= ../mk include ${MK}/os.mk diff --git a/init.d/Makefile b/init.d/Makefile index 82c73afb..d5c3ea8b 100644 --- a/init.d/Makefile +++ b/init.d/Makefile @@ -1,18 +1,18 @@ DIR= ${INITDIR} SRCS= bootmisc.in fsck.in hostname.in local.in localmount.in netmount.in \ - network.in root.in savecache.in staticroute.in swap.in swapfiles.in \ + root.in savecache.in swap.in swapfiles.in \ swclock.in sysctl.in urandom.in ${SRCS-${OS}} BIN= ${OBJS} # Build our old net foo or not -ifeq (${MKOLDNET},yes) -_OLDNET= net.lo +ifeq (${MKNET},) +INSTALLAFTER= _installafter_net.lo +SRCS+= net.lo.in endif -_NET_LO= ${_OLDNET} -INSTALLAFTER= _installafter_${_NET_LO} -CLEANFILES+= ${_NET_LO} -TARGETS+= ${_NET_LO} +ifeq (${MKNET},newnet) +SRCS+= network.in staticroute.in +endif MK= ../mk include ${MK}/os.mk @@ -45,4 +45,4 @@ include ${MK}/scripts.mk _installafter_: realinstall _installafter_net.lo: realinstall - ${INSTALL} -m ${BINMODE} net.lo ${DESTDIR}/${INITDIR}/${NET_LO} + ${INSTALL} -m ${BINMODE} net.lo ${DESTDIR}/${INITDIR}/${NET_LO-${OS}} diff --git a/runlevels/Makefile b/runlevels/Makefile index ac3796e0..2b25a350 100644 --- a/runlevels/Makefile +++ b/runlevels/Makefile @@ -1,5 +1,5 @@ -BOOT= bootmisc fsck hostname localmount network \ - root staticroute swap swapfiles sysctl urandom ${BOOT-${OS}} +BOOT= bootmisc fsck hostname localmount \ + root swap swapfiles sysctl urandom ${BOOT-${OS}} DEFAULT= local netmount SHUTDOWN= savecache ${SHUTDOWN-${OS}} SYSINIT= ${SYSINIT-${OS}} @@ -10,6 +10,16 @@ BOOTDIR= ${LEVELDIR}/boot DEFAULTDIR= ${LEVELDIR}/default SHUTDOWNDIR= ${LEVELDIR}/shutdown +ifeq (${MKNET},) +BOOT-FreeBSD += net.lo0 +BOOT-Linux += net.lo +BOOT-NetBSD += net.lo0 +endif + +ifeq (${MKNET},newnet) +BOOT+= network staticroute +endif + INITDIR= ../init.d MK= ../mk |