aboutsummaryrefslogtreecommitdiffstats
path: root/main/openrc/networking.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-23 18:24:11 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-23 18:24:11 +0000
commit2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd (patch)
treea63d3b3b1c89018b5419358eed5c2bb0acf1cd92 /main/openrc/networking.initd
parente374901731eb35599bd6735de4dd38560e3a79b8 (diff)
downloadaports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.bz2
aports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.xz
move core/* to main/
added maintainer to several packages as well
Diffstat (limited to 'main/openrc/networking.initd')
-rw-r--r--main/openrc/networking.initd28
1 files changed, 28 insertions, 0 deletions
diff --git a/main/openrc/networking.initd b/main/openrc/networking.initd
new file mode 100644
index 0000000000..2269e6f04f
--- /dev/null
+++ b/main/openrc/networking.initd
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+
+# note that the spoofprotect, syncoockies and ip_forward options are set in
+# /etc/sysctl.conf
+depend() {
+ after bootmisc
+ provide net
+ keyword nojail noprefix novserver
+}
+
+start() {
+ ebegin "Configuring network interfaces"
+ ifup -a >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Deconfiguring network interfaces"
+ ifdown -a >/dev/null 2>&1
+ eend $?
+}
+
+restart() {
+ ebegin "Reconfiguring network interfaces"
+ ifdown -a >/dev/null 2>&1 && ifup -a >/dev/null 2>&1
+ eend $?
+}
+