X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=master%2Fetc%2Finit.d%2Fetherwake;h=d23bccb09a3d660dc8736fafadebb71cb5b76501;hb=545c1fd0dfa3c0f2fde947aef9a317bc7b27b002;hp=401992e9c37564c16bdf113271e9eba2a61b6636;hpb=db52c898939ef78e4cb42638992ac54b6cf12163;p=debian6500.git diff --git a/master/etc/init.d/etherwake b/master/etc/init.d/etherwake index 401992e..d23bccb 100755 --- a/master/etc/init.d/etherwake +++ b/master/etc/init.d/etherwake @@ -1,5 +1,5 @@ #!/bin/sh -VER=1.3 +VER=1.4 # ============================================================================ # # Copyright (C) THALES. All rights reserved @@ -13,6 +13,8 @@ VER=1.3 # temps entre 2 wake # - V1.3: Laurent Mazet 02/05/2013 # Daemonisation +# - V1.4: Laurent Mazet & Thomas Perennou 03/12/2014 +# Legers correctifs # ============================================================================ ### BEGIN INIT INFO @@ -45,10 +47,10 @@ do_start () { n=0 while [ $NB_TRY -gt 0 ]; do - for mac in $(awk '{sub(/#.*/, "")} /trc[0-9]/ {gsub(/;/, " "); print $6}' $DHCPCONF); do - host=$(awk '{sub(/#.*/, "")} /'$mac'/ {print $2}' $DHCPCONF) + for mac in $(awk '{sub(/#.*/, "")} /trc[0-9]/ {gsub(/[;{}]/, " "); print $5}' $DHCPCONF); do + host=$(awk '{sub(/#.*/, "")} /'$mac'/ {gsub(/[{}]/, " "); print $2}' $DHCPCONF) - log_action_msg "Wake-up $host ($mac)" + log_action_msg "Wake-up $host (EtherWake $mac)" etherwake $mac n=$(expr $n + 1)