summaryrefslogtreecommitdiffstats
path: root/packaging/HPUX/configure.bin
blob: 603633360542eba22cd034f71082e89ed7b5885a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Samba.core configure script

RC=0

addUser()
{
     if grep -q '^pcguest:' /etc/passwd
     then
         cat <<__EOF__
NOTE:    Username pcguest already exists in /etc/passwd file.
__EOF__
        return
    fi

    /usr/sbin/useradd -g users -d /home/pcguest -c "Samba Guest" \
		      -s /usr/bin/true -m pcguest


    if [ $? -ne 0 ]
    then
        cat >&2 <<__EOF__
ERROR:   Failed to create username pcguest. 
__EOF__
        RC=1
    else
        cat <<__EOF__
NOTE:    The configure script has added username pcguest in /etc/passwd file.
         You must set the password for user pcguest in order to activate it.
__EOF__
    fi
}


addUser

ln -s /sbin/init.d/samba /sbin/rc3.d/S911samba
ln -s /sbin/init.d/samba /sbin/rc2.d/K130samba

if [ ! -f /etc/rc.config.d/samba ]
then
  cp /usr/local/samba/newconfig/samba.config /etc/rc.config.d/samba
fi

exit 0