# Description:
### END INIT INFO
+DHCPCONF=/etc/dhcp/dhcpd.conf
REBOOT="no"
TIMEOUT=15
ENABLE="yes"
fi
# shutdown all blades
- for host in $(awk '{sub(/#.*/, "")} /trc[0-9][0-9]/ && ! /-rf/ {print $2}' /etc/dhcp/dhcpd.conf); do
+ for host in $(awk '{sub(/#.*/, "")} /host\s+trc[0-9][0-9]/ && ! /-rf/ {print $2}' $DHCPCONF); do
grep $host /etc/hosts >&/dev/null || continue
( ping -c 1 $host >&/dev/null && { log_action_msg "shutdowning ${host/_1}"; ssh root@$host service $cmd stop; } ) &
done