diff options
Diffstat (limited to 'main/openrc/networking.initd')
-rw-r--r-- | main/openrc/networking.initd | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/main/openrc/networking.initd b/main/openrc/networking.initd new file mode 100644 index 000000000..2269e6f04 --- /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 $? +} + |