1#!/bin/sh 2 3netbios_setup() { 4 # No need to continue if we're called with an unsupported option 5 6 if [ "$reason" != BOUND ] && [ "$reason" != RENEW ] \ 7 && [ "$reason" != REBIND ] && [ "$reason" != REBOOT ] \ 8 && [ "$reason" != EXPIRE ] && [ "$reason" != FAIL ] 9 then 10 return 11 fi 12 13 umask 022 14 15 if [ -z "$new_netbios_name_servers" ] || [ "$reason" = FAIL ] \ 16 || [ "$reason" = EXPIRE ] 17 then 18 # FIXME: add sed magic to only remove wins servers 19 # associated with this interface 20 echo -n > /etc/samba/dhcp.conf 21 elif [ "$new_netbios_name_servers" != "$old_netbios_name_servers" ] 22 then 23 local serverlist="" 24 for server in $new_netbios_name_servers 25 do 26 serverlist="$serverlist $interface:$server" 27 done 28 # FIXME: add sed magic to only update wins servers 29 # associated with this interface 30 echo " wins server =$serverlist" > /etc/samba/dhcp.conf 31 fi 32} 33 34netbios_setup 35