wok diff knock/stuff/etc/init.d/knock @ rev 18897

syslinux/isohybrid.exe add -r support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 14 22:06:06 2016 +0100 (2016-02-14)
parents 1b6281d68d9f
children 7f188676b59c
line diff
     1.1 --- a/knock/stuff/etc/init.d/knock	Fri Sep 10 16:25:17 2010 +0200
     1.2 +++ b/knock/stuff/etc/init.d/knock	Sun Feb 14 22:06:06 2016 +0100
     1.3 @@ -13,7 +13,8 @@
     1.4  DAEMON=/usr/sbin/knockd
     1.5  OPTIONS=$KNOCK_OPTIONS
     1.6  PIDFILE=/var/run/knockd.pid
     1.7 -[ -n "$OPTIONS" ] || OPTIONS="-d"
     1.8 +IFACE="$(route -n | awk '{ if ($1 == "0.0.0.0" && $3 == $1) print $8}')"
     1.9 +[ -n "$OPTIONS" ] || OPTIONS="-d -i ${IFACE:-eth0}"
    1.10  
    1.11  case "$1" in
    1.12    start)