Skip to content

Instantly share code, notes, and snippets.

@Duncaen
Created February 8, 2015 15:01
Show Gist options
  • Save Duncaen/56b5ae38dab8284d9650 to your computer and use it in GitHub Desktop.
Save Duncaen/56b5ae38dab8284d9650 to your computer and use it in GitHub Desktop.
stdin
--- dhcpcd-run-hooks.orig 2015-02-08 15:40:49.000000000 +0100
+++ dhcpcd-run-hooks 2015-02-08 15:59:24.000000000 +0100
@@ -285,6 +285,10 @@ detect_init()
_service_exists="[ -x /etc/rc.d/rc.\$1 ]"
_service_cmd="/etc/rc.d/rc.\$1 \$2"
_service_status="/etc/rc.d/rc.\$1 status 1>/dev/null 2>&1"
+ elif [ -e /usr/bin/sv ]; then
+ _service_exists="[ -x /etc/sv/\$1 ]"
+ _service_cmd="/usr/bin/sv \$2 \$1"
+ _service_status="/usr/bin/sv s \$1 >/dev/null 2>&1"
else
for x in /etc/init.d/rc.d /etc/rc.d /etc/init.d; do
if [ -d $x ]; then
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment