1 |
commit: 60d6847de553970a80207fde6bd46f5f3696e049 |
2 |
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Jul 10 06:59:28 2012 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 10 07:39:36 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=60d6847d |
7 |
|
8 |
add the MKNET variable to select a network stack |
9 |
|
10 |
The MKNET variable can be used to select the network stack you want to |
11 |
build and install with OpenRC. |
12 |
|
13 |
The current default is the gentoo "oldnet" stack. If you want to install |
14 |
the OpenRC newnet stack, use MKNET=newnet on the make command line. |
15 |
|
16 |
--- |
17 |
Makefile | 3 +-- |
18 |
README | 2 +- |
19 |
conf.d/Makefile | 6 ++++-- |
20 |
init.d/Makefile | 16 ++++++++-------- |
21 |
runlevels/Makefile | 14 ++++++++++++-- |
22 |
5 files changed, 26 insertions(+), 15 deletions(-) |
23 |
|
24 |
diff --git a/Makefile b/Makefile |
25 |
index 028c363..593952a 100644 |
26 |
--- a/Makefile |
27 |
+++ b/Makefile |
28 |
@@ -7,8 +7,7 @@ include Makefile.inc |
29 |
SUBDIR= conf.d etc init.d local.d man scripts sh src sysctl.d |
30 |
|
31 |
# Build our old net foo or not |
32 |
-MKOLDNET?= yes |
33 |
-ifeq (${MKOLDNET},yes) |
34 |
+ifeq (${MKNET},) |
35 |
SUBDIR+= net doc |
36 |
endif |
37 |
|
38 |
|
39 |
diff --git a/README b/README |
40 |
index 70f334f..71bf00d 100644 |
41 |
--- a/README |
42 |
+++ b/README |
43 |
@@ -10,13 +10,13 @@ You may wish to tweak the installation with the below arguments |
44 |
PROGLDFLAGS=-static |
45 |
LIBNAME=lib64 |
46 |
DESTDIR=/tmp/openrc-image |
47 |
+MKNET=newnet |
48 |
MKPAM=pam |
49 |
MKPKGCONFIG=no |
50 |
MKSELINUX=yes |
51 |
MKSTATICLIBS=no |
52 |
MKTERMCAP=ncurses |
53 |
MKTERMCAP=termcap |
54 |
-MKOLDNET=no |
55 |
PKG_PREFIX=/usr/pkg |
56 |
LOCAL_PREFIX=/usr/local |
57 |
PREFIX=/usr/local |
58 |
|
59 |
diff --git a/conf.d/Makefile b/conf.d/Makefile |
60 |
index d5f85c3..412efae 100644 |
61 |
--- a/conf.d/Makefile |
62 |
+++ b/conf.d/Makefile |
63 |
@@ -1,9 +1,11 @@ |
64 |
DIR= ${CONFDIR} |
65 |
-CONF= bootmisc fsck hostname localmount network staticroute urandom \ |
66 |
- ${CONF-${OS}} |
67 |
+CONF= bootmisc fsck hostname localmount urandom ${CONF-${OS}} |
68 |
|
69 |
+ifeq (${MKNET},newnet) |
70 |
+CONF+= network staticroute |
71 |
TARGETS+= network staticroute |
72 |
CLEANFILES+= network staticroute |
73 |
+endif |
74 |
|
75 |
MK= ../mk |
76 |
include ${MK}/os.mk |
77 |
|
78 |
diff --git a/init.d/Makefile b/init.d/Makefile |
79 |
index 82c73af..d5c3ea8 100644 |
80 |
--- a/init.d/Makefile |
81 |
+++ b/init.d/Makefile |
82 |
@@ -1,18 +1,18 @@ |
83 |
DIR= ${INITDIR} |
84 |
SRCS= bootmisc.in fsck.in hostname.in local.in localmount.in netmount.in \ |
85 |
- network.in root.in savecache.in staticroute.in swap.in swapfiles.in \ |
86 |
+ root.in savecache.in swap.in swapfiles.in \ |
87 |
swclock.in sysctl.in urandom.in ${SRCS-${OS}} |
88 |
BIN= ${OBJS} |
89 |
|
90 |
# Build our old net foo or not |
91 |
-ifeq (${MKOLDNET},yes) |
92 |
-_OLDNET= net.lo |
93 |
+ifeq (${MKNET},) |
94 |
+INSTALLAFTER= _installafter_net.lo |
95 |
+SRCS+= net.lo.in |
96 |
endif |
97 |
-_NET_LO= ${_OLDNET} |
98 |
|
99 |
-INSTALLAFTER= _installafter_${_NET_LO} |
100 |
-CLEANFILES+= ${_NET_LO} |
101 |
-TARGETS+= ${_NET_LO} |
102 |
+ifeq (${MKNET},newnet) |
103 |
+SRCS+= network.in staticroute.in |
104 |
+endif |
105 |
|
106 |
MK= ../mk |
107 |
include ${MK}/os.mk |
108 |
@@ -45,4 +45,4 @@ include ${MK}/scripts.mk |
109 |
_installafter_: realinstall |
110 |
|
111 |
_installafter_net.lo: realinstall |
112 |
- ${INSTALL} -m ${BINMODE} net.lo ${DESTDIR}/${INITDIR}/${NET_LO} |
113 |
+ ${INSTALL} -m ${BINMODE} net.lo ${DESTDIR}/${INITDIR}/${NET_LO-${OS}} |
114 |
|
115 |
diff --git a/runlevels/Makefile b/runlevels/Makefile |
116 |
index ac3796e..2b25a35 100644 |
117 |
--- a/runlevels/Makefile |
118 |
+++ b/runlevels/Makefile |
119 |
@@ -1,5 +1,5 @@ |
120 |
-BOOT= bootmisc fsck hostname localmount network \ |
121 |
- root staticroute swap swapfiles sysctl urandom ${BOOT-${OS}} |
122 |
+BOOT= bootmisc fsck hostname localmount \ |
123 |
+ root swap swapfiles sysctl urandom ${BOOT-${OS}} |
124 |
DEFAULT= local netmount |
125 |
SHUTDOWN= savecache ${SHUTDOWN-${OS}} |
126 |
SYSINIT= ${SYSINIT-${OS}} |
127 |
@@ -10,6 +10,16 @@ BOOTDIR= ${LEVELDIR}/boot |
128 |
DEFAULTDIR= ${LEVELDIR}/default |
129 |
SHUTDOWNDIR= ${LEVELDIR}/shutdown |
130 |
|
131 |
+ifeq (${MKNET},) |
132 |
+BOOT-FreeBSD += net.lo0 |
133 |
+BOOT-Linux += net.lo |
134 |
+BOOT-NetBSD += net.lo0 |
135 |
+endif |
136 |
+ |
137 |
+ifeq (${MKNET},newnet) |
138 |
+BOOT+= network staticroute |
139 |
+endif |
140 |
+ |
141 |
INITDIR= ../init.d |
142 |
|
143 |
MK= ../mk |