update custom services
[debian6500.git] / master / etc / init.d / etherwake
index 4c10152fe658553e7ad165057cd7fd990d4ca468..401992e9c37564c16bdf113271e9eba2a61b6636 100755 (executable)
@@ -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)"