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 SUBDIR= conf.d etc init.d local.d man scripts sh src sysctl.d
# Build our old net foo or not # Build our old net foo or not
MKOLDNET?= yes ifeq (${MKNET},)
ifeq (${MKOLDNET},yes)
SUBDIR+= net doc SUBDIR+= net doc
endif endif

2
README
View File

@ -10,13 +10,13 @@ You may wish to tweak the installation with the below arguments
PROGLDFLAGS=-static PROGLDFLAGS=-static
LIBNAME=lib64 LIBNAME=lib64
DESTDIR=/tmp/openrc-image DESTDIR=/tmp/openrc-image
MKNET=newnet
MKPAM=pam MKPAM=pam
MKPKGCONFIG=no MKPKGCONFIG=no
MKSELINUX=yes MKSELINUX=yes
MKSTATICLIBS=no MKSTATICLIBS=no
MKTERMCAP=ncurses MKTERMCAP=ncurses
MKTERMCAP=termcap MKTERMCAP=termcap
MKOLDNET=no
PKG_PREFIX=/usr/pkg PKG_PREFIX=/usr/pkg
LOCAL_PREFIX=/usr/local LOCAL_PREFIX=/usr/local
PREFIX=/usr/local PREFIX=/usr/local

View File

@ -1,9 +1,11 @@
DIR= ${CONFDIR} DIR= ${CONFDIR}
CONF= bootmisc fsck hostname localmount network staticroute urandom \ CONF= bootmisc fsck hostname localmount urandom ${CONF-${OS}}
${CONF-${OS}}
ifeq (${MKNET},newnet)
CONF+= network staticroute
TARGETS+= network staticroute TARGETS+= network staticroute
CLEANFILES+= network staticroute CLEANFILES+= network staticroute
endif
MK= ../mk MK= ../mk
include ${MK}/os.mk include ${MK}/os.mk

View File

@ -1,18 +1,18 @@
DIR= ${INITDIR} DIR= ${INITDIR}
SRCS= bootmisc.in fsck.in hostname.in local.in localmount.in netmount.in \ 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}} swclock.in sysctl.in urandom.in ${SRCS-${OS}}
BIN= ${OBJS} BIN= ${OBJS}
# Build our old net foo or not # Build our old net foo or not
ifeq (${MKOLDNET},yes) ifeq (${MKNET},)
_OLDNET= net.lo INSTALLAFTER= _installafter_net.lo
SRCS+= net.lo.in
endif endif
_NET_LO= ${_OLDNET}
INSTALLAFTER= _installafter_${_NET_LO} ifeq (${MKNET},newnet)
CLEANFILES+= ${_NET_LO} SRCS+= network.in staticroute.in
TARGETS+= ${_NET_LO} endif
MK= ../mk MK= ../mk
include ${MK}/os.mk include ${MK}/os.mk
@ -45,4 +45,4 @@ include ${MK}/scripts.mk
_installafter_: realinstall _installafter_: realinstall
_installafter_net.lo: 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 \ BOOT= bootmisc fsck hostname localmount \
root staticroute swap swapfiles sysctl urandom ${BOOT-${OS}} root swap swapfiles sysctl urandom ${BOOT-${OS}}
DEFAULT= local netmount DEFAULT= local netmount
SHUTDOWN= savecache ${SHUTDOWN-${OS}} SHUTDOWN= savecache ${SHUTDOWN-${OS}}
SYSINIT= ${SYSINIT-${OS}} SYSINIT= ${SYSINIT-${OS}}
@ -10,6 +10,16 @@ BOOTDIR= ${LEVELDIR}/boot
DEFAULTDIR= ${LEVELDIR}/default DEFAULTDIR= ${LEVELDIR}/default
SHUTDOWNDIR= ${LEVELDIR}/shutdown 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 INITDIR= ../init.d
MK= ../mk MK= ../mk