3 SAMBA_DHCP_CONF
=/etc
/samba
/dhcp.conf
6 # No need to continue if we're called with an unsupported option
8 if [ "$reason" != BOUND
] && [ "$reason" != RENEW
] \
9 && [ "$reason" != REBIND
] && [ "$reason" != REBOOT
] \
10 && [ "$reason" != EXPIRE
] && [ "$reason" != FAIL
]
15 # Nor should we continue if no settings have changed
16 if [ "$new_netbios_name_servers" = "$old_netbios_name_servers" ] \
17 && [ "$new_netbios_scope" = "$old_netbios_scope" ]
22 # reparse our own file
23 local other_servers
=`sed -n -e"s/[[:space:]]$interface:[^[:space:]]*//g; \
24 s/^[[:space:]]*wins server[[:space:]]*=[[:space:]]*//pi" \
29 local serverlist
="$other_servers"
30 for server
in $new_netbios_name_servers
32 serverlist
="$serverlist $interface:$server"
35 echo -n > $SAMBA_DHCP_CONF
37 # If we're updating on failure/expire, AND there are no WINS
38 # servers for other interfaces, leave the file empty.
39 if [ -z "$other_servers" ]
41 if [ "$reason" = FAIL
] ||
[ "$reason" = EXPIRE
]
47 if [ -n "$serverlist" ]
49 echo " wins server =$serverlist" >> $SAMBA_DHCP_CONF
51 if [ -n "$new_netbios_scope" ]
53 echo " netbios scope = $new_netbios_scope" >> $SAMBA_DHCP_CONF