1 |
commit: 5994e55937cbbb71b1c22ad829b77a1bcd8c3793 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 15 23:06:10 2011 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 16 19:29:52 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=5994e559 |
7 |
|
8 |
Deprecate the network and staticroute scripts |
9 |
|
10 |
These scripts are not supported, and they have several major design |
11 |
issues such as not being able to stop, start or allow a dependency on a |
12 |
single interface. |
13 |
|
14 |
--- |
15 |
Makefile | 7 +------ |
16 |
README | 1 - |
17 |
README.newnet | 40 ---------------------------------------- |
18 |
init.d/Makefile | 14 ++++---------- |
19 |
init.d/network.in | 6 ++++++ |
20 |
init.d/staticroute.in | 5 +++++ |
21 |
runlevels/Makefile | 8 +++----- |
22 |
7 files changed, 19 insertions(+), 62 deletions(-) |
23 |
|
24 |
diff --git a/Makefile b/Makefile |
25 |
index 74cf483..6263e7f 100644 |
26 |
--- a/Makefile |
27 |
+++ b/Makefile |
28 |
@@ -4,12 +4,7 @@ |
29 |
|
30 |
include Makefile.inc |
31 |
|
32 |
-SUBDIR= conf.d etc init.d local.d man scripts sh src |
33 |
- |
34 |
-# Build our old net foo or not |
35 |
-ifeq (${MKOLDNET},yes) |
36 |
-SUBDIR+= net doc |
37 |
-endif |
38 |
+SUBDIR= conf.d doc etc init.d local.d man net scripts sh src |
39 |
|
40 |
# Build pkgconfig or not |
41 |
MKPKGCONFIG?= yes |
42 |
|
43 |
diff --git a/README b/README |
44 |
index 5f3745c..646174e 100644 |
45 |
--- a/README |
46 |
+++ b/README |
47 |
@@ -16,7 +16,6 @@ MKRCSYS=prefix |
48 |
MKSELINUX=yes |
49 |
MKTERMCAP=ncurses |
50 |
MKTERMCAP=termcap |
51 |
-MKOLDNET=yes |
52 |
PKG_PREFIX=/usr/pkg |
53 |
LOCAL_PREFIX=/usr/local |
54 |
PREFIX=/usr/local |
55 |
|
56 |
diff --git a/README.newnet b/README.newnet |
57 |
deleted file mode 100644 |
58 |
index 2e157e2..0000000 |
59 |
--- a/README.newnet |
60 |
+++ /dev/null |
61 |
@@ -1,40 +0,0 @@ |
62 |
-The following applies only to the newnet stack, which is not presently |
63 |
-maintained in OpenRC. The oldnet stack is maintained instead. |
64 |
-- Robin H. Johnson <robbat2@g.o>, 2011/02/21 |
65 |
- |
66 |
-OpenRC Network Ideals |
67 |
---------------------- |
68 |
- |
69 |
-The new style networking for OpenRC is very simplistic - provide a basic means |
70 |
-of configuring static interface address and routes whilst allowing the |
71 |
-possibility to run any command at any point. |
72 |
- |
73 |
-In a nutshell, init.d/network is a wrapper around ifconfig(8) and |
74 |
-init.d/staticroute is wrapper around route(8). |
75 |
- |
76 |
-In the Perfect World (TM) ifconfig should be able to configure everything |
77 |
-about the interface easily * . The BSD family almost get this right and Linux |
78 |
-epically fails. |
79 |
- |
80 |
-* Only static configuration, including link setup. |
81 |
-For dynamic, static, IPv4LL, arping and per ssid IPv4 setup dhcpcd-5.x |
82 |
-provides your needs. |
83 |
- |
84 |
-It fails because there are many tools to do the same job and often have |
85 |
-vastly different syntax where they could be similar. In other words, there |
86 |
-is no coherence. |
87 |
- |
88 |
-OpenRC-0.4.x and older (inc Gentoo baselayout-1) had a collection of scripts |
89 |
-for each tool and allowed a script per interface. Over the years, this design |
90 |
-has proven very hard to maintain as each user has their own idea of how |
91 |
-things should work. Also, there were (and still are) race conditions. |
92 |
- |
93 |
-So where do we go from here? |
94 |
-Well, it's possible to use the new network scripts using the tools |
95 |
-currently available. It's just harder as you have to know them and their |
96 |
-documentation can be lacking at times. |
97 |
-The correct end goal is a BSD style ifconfig tool. |
98 |
-I've started work on it, but the project has stalled somewhat. |
99 |
-It's display only right now and the source is not yet publicly available. |
100 |
-If you have the skills and share the vision then contact me privately and |
101 |
-we'll take it from there. |
102 |
|
103 |
diff --git a/init.d/Makefile b/init.d/Makefile |
104 |
index de8428a..8351f3c 100644 |
105 |
--- a/init.d/Makefile |
106 |
+++ b/init.d/Makefile |
107 |
@@ -4,15 +4,9 @@ SRCS= bootmisc.in fsck.in hostname.in local.in localmount.in netmount.in \ |
108 |
sysctl.in urandom.in ${SRCS-${OS}} |
109 |
BIN= ${OBJS} |
110 |
|
111 |
-# Build our old net foo or not |
112 |
-ifeq (${MKOLDNET},yes) |
113 |
-_OLDNET= net.lo |
114 |
-endif |
115 |
-_NET_LO= ${_OLDNET} |
116 |
- |
117 |
-INSTALLAFTER= _installafter_${_NET_LO} |
118 |
-CLEANFILES+= ${_NET_LO} |
119 |
-TARGETS+= ${_NET_LO} |
120 |
+INSTALLAFTER= _installafter_net.lo |
121 |
+CLEANFILES+= net.lo |
122 |
+TARGETS+= net.lo |
123 |
|
124 |
MK= ../mk |
125 |
include ${MK}/os.mk |
126 |
@@ -45,4 +39,4 @@ include ${MK}/scripts.mk |
127 |
_installafter_: realinstall |
128 |
|
129 |
_installafter_net.lo: realinstall |
130 |
- ${INSTALL} -m ${BINMODE} net.lo ${DESTDIR}/${INITDIR}/${NET_LO} |
131 |
+ ${INSTALL} -m ${BINMODE} net.lo ${DESTDIR}/${INITDIR}/${NET_LO-${OS}} |
132 |
|
133 |
diff --git a/init.d/network.in b/init.d/network.in |
134 |
index bd68391..c934129 100644 |
135 |
--- a/init.d/network.in |
136 |
+++ b/init.d/network.in |
137 |
@@ -219,6 +219,12 @@ start() |
138 |
eend $? |
139 |
fi |
140 |
|
141 |
+ ewarn |
142 |
+ ewarn "The $RC_SVCNAME script is deprecated and will be" |
143 |
+ ewarn "removed in the future." |
144 |
+ ewarn "Please use the net.* scripts to manage your network interfaces." |
145 |
+ ewarn |
146 |
+ |
147 |
einfo "Starting network" |
148 |
routeflush |
149 |
if [ "$RC_UNAME" = "Linux" ]; then |
150 |
|
151 |
diff --git a/init.d/staticroute.in b/init.d/staticroute.in |
152 |
index 213dddf..294f890 100644 |
153 |
--- a/init.d/staticroute.in |
154 |
+++ b/init.d/staticroute.in |
155 |
@@ -93,6 +93,11 @@ do_routes() |
156 |
|
157 |
start() |
158 |
{ |
159 |
+ ewarn |
160 |
+ ewarn "The $RC_SVCNAME script is deprecated and will be" |
161 |
+ ewarn "removed in the future." |
162 |
+ ewarn "Please use the net.* scripts to manage your network interfaces." |
163 |
+ ewarn |
164 |
do_routes "Adding" "add" |
165 |
} |
166 |
|
167 |
|
168 |
diff --git a/runlevels/Makefile b/runlevels/Makefile |
169 |
index f454950..c1a9f09 100644 |
170 |
--- a/runlevels/Makefile |
171 |
+++ b/runlevels/Makefile |
172 |
@@ -1,5 +1,5 @@ |
173 |
-BOOT= bootmisc fsck hostname localmount network \ |
174 |
- root staticroute swap sysctl urandom ${BOOT-${OS}} |
175 |
+BOOT= bootmisc fsck hostname localmount \ |
176 |
+ root swap sysctl urandom ${BOOT-${OS}} |
177 |
DEFAULT= local netmount |
178 |
SHUTDOWN= savecache ${SHUTDOWN-${OS}} |
179 |
SYSINIT= ${SYSINIT-${OS}} |
180 |
@@ -10,8 +10,6 @@ BOOTDIR= ${LEVELDIR}/boot |
181 |
DEFAULTDIR= ${LEVELDIR}/default |
182 |
SHUTDOWNDIR= ${LEVELDIR}/shutdown |
183 |
|
184 |
-INITDIR= ../init.d |
185 |
- |
186 |
MK= ../mk |
187 |
include ${MK}/sys.mk |
188 |
include ${MK}/os.mk |
189 |
@@ -28,7 +26,7 @@ BOOT-FreeBSD= hostid net.lo0 newsyslog savecore syslogd |
190 |
# FreeBSD specific stuff |
191 |
BOOT-FreeBSD+= adjkerntz dumpon syscons |
192 |
|
193 |
-BOOT-Linux= hwclock keymaps modules mtab procfs termencoding |
194 |
+BOOT-Linux= hwclock keymaps modules mtab net.lo procfs termencoding |
195 |
SHUTDOWN-Linux= killprocs mount-ro |
196 |
SYSINIT-Linux= devfs dmesg |