aboutsummaryrefslogtreecommitdiff
path: root/examples/var_service/dhcp_if_pinger
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-07-03 17:02:50 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2018-07-03 17:02:50 +0200
commitaa75a7da7f3b0bb50be82f535244137bae423fa8 (patch)
tree781df3664a0f5b29cb4a8b715c28ac75b4c1584c /examples/var_service/dhcp_if_pinger
parente5d5f5b9a770de5a48d1a3bd293d5d611d6624c4 (diff)
downloadbusybox-aa75a7da7f3b0bb50be82f535244137bae423fa8.tar.gz
examples/var_service/: use "svc" for service commands, other tweaks
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'examples/var_service/dhcp_if_pinger')
-rwxr-xr-xexamples/var_service/dhcp_if_pinger/run16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/var_service/dhcp_if_pinger/run b/examples/var_service/dhcp_if_pinger/run
index 8aca90c1a..25341243f 100755
--- a/examples/var_service/dhcp_if_pinger/run
+++ b/examples/var_service/dhcp_if_pinger/run
@@ -21,9 +21,9 @@ if test -f "$0.log"; then
mv "$0.log.new" "$0.log"
fi
-test -f "/var/service/dhcp_$if/env.out" || exec env - sleep "$ping_time"
+test -f "../dhcp_$if/env.out" || exec env - sleep "$ping_time"
-. "/var/service/dhcp_$if/env.out"
+. "../dhcp_$if/env.out"
test x"$router" != x"" || exec env - sleep "$ping_time"
#msg "Pinging $router"
@@ -36,12 +36,12 @@ while true; do
env - sleep "$retry_time"
done
-test -d "/var/service/dhcp_$if" && {
- msg "Restarting /var/service/dhcp_$if"
- sv t "/var/service/dhcp_$if"
+test -d "../dhcp_$if" && {
+ msg "Restarting dhcp_$if"
+ svc -t "dhcp_$if"
}
-test -d "/var/service/supplicant_$if" && {
- msg "Restarting /var/service/supplicant_$if"
- sv t "/var/service/supplicant_$if"
+test -d "../supplicant_$if" && {
+ msg "Restarting supplicant_$if"
+ svc -t "supplicant_$if"
}
exec env - sleep "$ping_time"