#!/bin/sh
source /etc/profile

extract_winsip()
{
WINSIPADDR=`nmblookup $1 | awk '$2 ~ /<00>/{print $1}'`

echo "adresse ip $1:$WINSIPADDR"
}

extract_winsip $SERVER_IP



#on copy l'adresse de la machine dans profile
sed "s/#WINSIPADDR#/$WINSIPADDR/" /etc/profile.template > /etc/profile

