diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2020-01-16 16:54:55 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2020-01-16 16:56:39 +0100 |
commit | 6a467d4a814f4ce4ce59f9022e656fad7a4c79aa (patch) | |
tree | 5f07aa9aa4c762a398c6d87ebb950d62c1eaadb9 /main/openrc | |
parent | fbffce429c811daacb29fb83c2158c7a3153966e (diff) | |
download | aports-6a467d4a814f4ce4ce59f9022e656fad7a4c79aa.tar.bz2 aports-6a467d4a814f4ce4ce59f9022e656fad7a4c79aa.tar.xz |
main/openrc: allow to change interfaces config location
Diffstat (limited to 'main/openrc')
-rw-r--r-- | main/openrc/APKBUILD | 2 | ||||
-rw-r--r-- | main/openrc/networking.initd | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/main/openrc/APKBUILD b/main/openrc/APKBUILD index 230a5e9ea5..00227060a6 100644 --- a/main/openrc/APKBUILD +++ b/main/openrc/APKBUILD @@ -129,7 +129,7 @@ ff9bf2f6e4f55633a9641385398f70a2e591e2b3b56b1903f168a97b07bd56dc5a65d151deeab942 c06eac7264f6cc6888563feeae5ca745aae538323077903de1b19102e4f16baa34c18b8c27af5dd5423e7670834e2261e9aa55f2b1ec8d8fdc2be105fe894d55 hwdrivers.initd b04058ec630e19de0bafefe06198dc1bff8c8d5d2c89e4660dd83dda8bb82a76cdb1d8661cce88e4a406aa6b4152e17efff52d3eb18ffaec0751d0b6cdbcc48a modules.initd 595098085d5a1204e3c5af59bb4a3b3d1fb2980db77925995aa1ec43ef5ae378cef736ddc7924191a99d39c93891d59274fbba08127b15d584c2f82b067ef683 modloop.initd -6635840ba0b3444d1ede16be324295e9ab90c570fc959e38f695cc41b538ea4c7b3d518c6bebc3dc429c9c82c8ed930928eb6a592de0b3517dfdc9b3a4243502 networking.initd +d21164f4d265456c7633c1f63a296170fcd0d95ca509bbf57c16ac33e4f2e55b840d9e5811f863732040f443ef43d4b9f248d939e273997000556014f114e82e networking.initd 80e43ded522e2d48b876131c7c9997debd43f3790e0985801a8c1dd60bc6e09f625b35a127bf225eb45a65eec7808a50d1c08a5e8abceafc61726211e061e0a2 modloop.confd d76c75c58e6f4b0801edac4e081b725ef3d50a9a8c9bbb5692bf4d0f804af7d383bf71a73d5d03ed348a89741ef0b2427eb6a7cbf5a9b9ff60a240639fa6ec88 sysfsconf.initd f65b061b4272463071022e88a7392d5573f2d95f91e42c8b4f3ef69171604460ddd3d426dfbab382f73a3fac68d4b4ff3a923fdc49fb6fd9f27ebd3ab24e0d0e firstboot.initd" diff --git a/main/openrc/networking.initd b/main/openrc/networking.initd index 947e1f0aeb..1de19be1f5 100644 --- a/main/openrc/networking.initd +++ b/main/openrc/networking.initd @@ -3,7 +3,7 @@ # note that the spoofprotect, syncoockies and ip_forward options are set in # /etc/sysctl.conf -ifconf=/etc/network/interfaces +: ${cfgfile:="/etc/network/interfaces"} ifstate=/run/ifstate single_iface="${RC_SVCNAME#*.}" @@ -23,7 +23,7 @@ find_ifaces() { if [ -n "$single_iface" ]; then echo $single_iface else - awk '$1 == "auto" {for (i = 2; i <= NF; i = i + 1) printf("%s ", $i)}' $ifconf + awk '$1 == "auto" {for (i = 2; i <= NF; i = i + 1) printf("%s ", $i)}' "$cfgfile" fi } @@ -43,8 +43,8 @@ start() { for iface in $(find_ifaces); do local r=0 ebegin "$iface" - if ! ifup $iface >/dev/null; then - ifdown $iface >/dev/null 2>&1 + if ! ifup -i "$cfgfile" $iface >/dev/null; then + ifdown -i "$cfgfile" $iface >/dev/null 2>&1 r=1 fi # atleast one interface needs to be started for action @@ -64,7 +64,7 @@ stop() { eindent for iface in $(find_running_ifaces); do ebegin "$iface" - ifdown -f $iface >/dev/null + ifdown -i "$cfgfile" -f $iface >/dev/null eend $? done eoutdent |