~vcs-imports/samba/main

« back to all changes in this revision

Viewing changes to packaging/Debian/debian-woody/samba-common.dhcp

  • Committer: jerry
  • Date: 2006-07-14 21:48:39 UTC
  • Revision ID: vcs-imports@canonical.com-20060714214839-586d8c489a8fcead
gutting trunk to move to svn:externals

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
netbios_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
 
 
34
 
netbios_setup