source: branches/samba-3.0/packaging/SGI/inetd.sh@ 1036

Last change on this file since 1036 was 1, checked in by Paul Smedley, 19 years ago

Initial code import

File size: 1.0 KB
Line 
1#! /bin/sh
2#
3# kill any running samba processes
4#
5/etc/killall smbd nmbd
6chkconfig samba off
7
8#
9# add SAMBA deamons to inetd.conf
10#
11cp /etc/inetd.conf /etc/inetd.conf.O
12
13if [ $? -ne 0 ]; then exit 1; fi
14if [ ! -r /etc/inetd.conf.O -o ! -w /etc/inetd.conf ]; then exit 1; fi
15
16sed -e "/^netbios/D" -e "/^#SAMBA/D" /etc/inetd.conf.O > /etc/inetd.conf
17echo '#SAMBA services' >> /etc/inetd.conf
18echo netbios-ssn stream tcp nowait root /usr/samba/bin/smbd smbd >> /etc/inetd.conf
19echo netbios-ns dgram udp wait root /usr/samba/bin/nmbd nmbd -S >> /etc/inetd.conf
20
21#
22# add SAMBA service ports to /etc/services
23#
24cp /etc/services /etc/services.O
25
26if [ $? -ne 0 ]; then exit 1; fi
27if [ ! -r /etc/services.O -o ! -w /etc/services ]; then exit 1; fi
28
29sed -e "/^netbios/D" -e "/^#SAMBA/D" /etc/services.O > /etc/services
30echo '#SAMBA services' >> /etc/services
31echo 'netbios-ns 137/udp # SAMBA' >> /etc/services
32echo 'netbios-ssn 139/tcp # SAMBA' >> /etc/services
33
34#
35# restart inetd to start SAMBA
36#
37/etc/killall -HUP inetd
Note: See TracBrowser for help on using the repository browser.