X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=master%2Fetc%2Finit.d%2Fetherwake;h=401992e9c37564c16bdf113271e9eba2a61b6636;hb=605d1269a6d583df6b0f6a0fbeec1562a05aff28;hp=4c10152fe658553e7ad165057cd7fd990d4ca468;hpb=857c2892afaa17f7fc430e18b35926599c09c5b5;p=debian6500.git diff --git a/master/etc/init.d/etherwake b/master/etc/init.d/etherwake index 4c10152..401992e 100755 --- a/master/etc/init.d/etherwake +++ b/master/etc/init.d/etherwake @@ -28,7 +28,7 @@ VER=1.3 DHCPCONF=/etc/dhcp/dhcpd.conf GROUP_SIZE=5 -NB_TRY=1 +NB_TRY=2 ENABLE="yes" PATH=/sbin:/usr/sbin:/bin:/usr/bin @@ -41,10 +41,11 @@ do_start () { log_action_msg "Activate EtherWake" + sleep 1 n=0 while [ $NB_TRY -gt 0 ]; do - for mac in $(awk '{sub(/#.*/, "")} /trc[0-9]/ && /-rf/ {gsub(/;/, " "); print $6}' $DHCPCONF); do + for mac in $(awk '{sub(/#.*/, "")} /trc[0-9]/ {gsub(/;/, " "); print $6}' $DHCPCONF); do host=$(awk '{sub(/#.*/, "")} /'$mac'/ {print $2}' $DHCPCONF) log_action_msg "Wake-up $host ($mac)"