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.
This commit is contained in:
William Hubbs 2012-07-10 01:59:28 -05:00
parent ecb4d7c3f2
commit 60d6847de5
5 changed files with 26 additions and 15 deletions

View File

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

2
README
View File

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

View File

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

View File

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

View File

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