← Commit list

a40a661d9

Denys Vlasenko
Denys Vlasenko
2018-05-20
SUCCESS Duration: 146s

Subject

tweak /var/service example

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

examples/var_service/ifplugd_if/ifplugd_handler+14 -9
@@ -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