diff options
author | Denys Vlasenko | 2018-05-20 22:43:42 +0200 |
---|---|---|
committer | Denys Vlasenko | 2018-05-20 22:43:42 +0200 |
commit | a40a661d971cf75c617c83357ac0e87a45f41f4f (patch) | |
tree | bfdf4805a4c53bf0c6b683a1b6fab1b145ea2b58 /examples/var_service | |
parent | 2ccd3522816291bd7e3ede3f60370d725d86e179 (diff) | |
download | busybox-a40a661d971cf75c617c83357ac0e87a45f41f4f.zip busybox-a40a661d971cf75c617c83357ac0e87a45f41f4f.tar.gz |
tweak /var/service example
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'examples/var_service')
-rwxr-xr-x | examples/var_service/ifplugd_if/ifplugd_handler | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/examples/var_service/ifplugd_if/ifplugd_handler b/examples/var_service/ifplugd_if/ifplugd_handler index 4962fcf..0749019 100755 --- a/examples/var_service/ifplugd_if/ifplugd_handler +++ b/examples/var_service/ifplugd_if/ifplugd_handler @@ -3,13 +3,18 @@ # $1: interface # $2: state -if test -d "/var/service/dhcp_$1"; then - if test x"$2" = x"down"; then - echo "Downing /var/service/dhcp_$1" - sv d "/var/service/dhcp_$1" - fi - if test x"$2" = x"up"; then - echo "Upping /var/service/dhcp_$1" - sv u "/var/service/dhcp_$1" - fi +if test x"$2" = x"down"; then + echo "Downing dhcp_$1" + svc -d "dhcp_$1" + echo "Downing zcip_$1" + svc -d "zcip_$1" fi +if test x"$2" = x"up"; then + echo "Upping dhcp_$1" + svc -u "dhcp_$1" + echo "Upping zcip_$1" + svc -u "zcip_$1" +fi +# Parent ifplugd exits if we exit with nonzero. +# Do not startle it: +exit 0 |