diff options
author | felics@felics-tablet | 2016-02-28 17:51:37 +0100 |
---|---|---|
committer | felics@felics-tablet | 2016-02-28 17:51:37 +0100 |
commit | 15a89e92f2a67d936bfe2906dcbc0aa2f4c8ac61 (patch) | |
tree | ab07b3215a513b8b3569a21acb73285c03540d73 /netcfg.openrc | |
download | aur-15a89e92f2a67d936bfe2906dcbc0aa2f4c8ac61.tar.gz |
Initial commit.
Diffstat (limited to 'netcfg.openrc')
-rwxr-xr-x | netcfg.openrc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/netcfg.openrc b/netcfg.openrc new file mode 100755 index 000000000000..b46e5fe8e1f4 --- /dev/null +++ b/netcfg.openrc @@ -0,0 +1,33 @@ +#!/usr/bin/openrc-run +# OpenRC init script to configure the network via netcfg + +## 'netcfg-daemon' configures netcfg profiles as specified in /etc/conf.d/netcfg + +_EXECUTABLE="/usr/bin/netcfg-daemon" + +depend() { + need localmount + after net.lo net.lo0 bootmisc + provide net + keyword -jail -prefix -vserver +} + +start() { + ebegin "Setting up netcfg network profiles" + + "${_EXECUTABLE}" start + + eend "$?" +} + +stop() { + ebegin "Deconfiguring netcfg network profiles" + + if netcfg-daemon status | grep -qvE '^netcfg\-daemon was not started'; then + "${_EXECUTABLE}" stop + else + echo "netcfg-daemon was not started." + fi + + eend "$?" +} |