diff options
author | Petr Štetiar <ynezz@true.cz> | 2019-07-23 12:16:03 +0200 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-09-15 22:53:01 +0200 |
commit | 296e1f253c77a2cbf5364a0e9f83fd9946ce9dbf (patch) | |
tree | f31ee69708c154336c1726b0304c5d6ed2ecdadf /package/network | |
parent | 7519a36774ca0e50dfae6a4b9fea75cab95171a5 (diff) | |
download | upstream-296e1f253c77a2cbf5364a0e9f83fd9946ce9dbf.tar.gz upstream-296e1f253c77a2cbf5364a0e9f83fd9946ce9dbf.tar.bz2 upstream-296e1f253c77a2cbf5364a0e9f83fd9946ce9dbf.zip |
netifd,lldpd,rpcd,log: use generic service_running
commit eb204d14f75c ("base-files: implement generic service_running")
introduced generic service_running so it's not needed to copy&paste same
3 lines over and over again.
I've removed service_running from netifd/network init script as well,
because it was not working properly, looked quite strange and I didn't
understand the intention:
$ /etc/init.d/network stop
$ service network running && echo "yes" || echo "nope"
( have to wait for 30s )
Command failed: Request timed out
yes
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'package/network')
-rwxr-xr-x | package/network/config/netifd/files/etc/init.d/network | 5 | ||||
-rw-r--r-- | package/network/services/lldpd/files/lldpd.init | 4 |
2 files changed, 0 insertions, 9 deletions
diff --git a/package/network/config/netifd/files/etc/init.d/network b/package/network/config/netifd/files/etc/init.d/network index 2321a309a5..dc208c4ce0 100755 --- a/package/network/config/netifd/files/etc/init.d/network +++ b/package/network/config/netifd/files/etc/init.d/network @@ -40,11 +40,6 @@ stop_service() { sleep 1 } -service_running() { - ubus -t 30 wait_for network.interface - /sbin/wifi reload_legacy -} - validate_atm_bridge_section() { uci_validate_section network "atm-bridge" "${1}" \ diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index bc429de484..9fb3a82559 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -96,10 +96,6 @@ start_service() { procd_close_instance } -service_running() { - pgrep -x /usr/sbin/lldpd &> /dev/null -} - reload_service() { running || return 1 $LLDPCLI -u $LLDPSOCKET &> /dev/null <<-EOF |