$FAI_REMOTESH and $LOGSERVER in FAI~beta

Juraj Holtak juraj.holtak at proaut.org
Thu Sep 21 14:02:01 CEST 2006


have these been completly removed or just renamed?

I`m using them in my hook to gather the macaddr for wake-on-lan purposes, when 
I want to fire up automatic reinstall on all clients (desktops, they are 
turned of at night).

#! /bin/bash
wolfile="fai-wol.cfg"
echo "Update FAI-WOL via $FAI_REMOTESH to $LOGUSER@$LOGSERVER: $wolfile"
macaddr=`macchanger -s eth0`
datum=`date`
wollogline="$HOSTNAME $IPADDR $macaddr"
grepecho=`$FAI_REMOTESH -l $LOGUSER $LOGSERVER "grep '$wollogline' $wolfile"`
if [ -n "$grepecho" ]; then
    echo "This computer is alredy registered in the WOL config file"
    echo "WOL alredy contains $grepecho"
else
    $FAI_REMOTESH -l $LOGUSER $LOGSERVER "echo '$wollogline'>>$wolfile"
    echo "Addind to WOL list: $grepecho"
fi

thnx,

juraj



More information about the linux-fai mailing list