s4-classicupgrade: Do all the queries of data before the provision()
[Samba/gebeck_regimport.git] / packaging / SGI / inetd.sh
blob1d403978aecba3e034d791b53b9a1f3d57ffef72
1 #! /bin/sh
3 # kill any running samba processes
5 /etc/killall smbd nmbd
6 chkconfig samba off
9 # add SAMBA deamons to inetd.conf
11 cp /etc/inetd.conf /etc/inetd.conf.O
13 if [ $? -ne 0 ]; then exit 1; fi
14 if [ ! -r /etc/inetd.conf.O -o ! -w /etc/inetd.conf ]; then exit 1; fi
16 sed -e "/^netbios/D" -e "/^#SAMBA/D" /etc/inetd.conf.O > /etc/inetd.conf
17 echo '#SAMBA services' >> /etc/inetd.conf
18 echo netbios-ssn stream tcp nowait root /usr/samba/bin/smbd smbd >> /etc/inetd.conf
19 echo netbios-ns dgram udp wait root /usr/samba/bin/nmbd nmbd -S >> /etc/inetd.conf
22 # add SAMBA service ports to /etc/services
24 cp /etc/services /etc/services.O
26 if [ $? -ne 0 ]; then exit 1; fi
27 if [ ! -r /etc/services.O -o ! -w /etc/services ]; then exit 1; fi
29 sed -e "/^netbios/D" -e "/^#SAMBA/D" /etc/services.O > /etc/services
30 echo '#SAMBA services' >> /etc/services
31 echo 'netbios-ns 137/udp # SAMBA' >> /etc/services
32 echo 'netbios-ssn 139/tcp # SAMBA' >> /etc/services
35 # restart inetd to start SAMBA
37 /etc/killall -HUP inetd