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
|
---|
6 | chkconfig samba off
|
---|
7 |
|
---|
8 | #
|
---|
9 | # add SAMBA deamons to inetd.conf
|
---|
10 | #
|
---|
11 | cp /etc/inetd.conf /etc/inetd.conf.O
|
---|
12 |
|
---|
13 | if [ $? -ne 0 ]; then exit 1; fi
|
---|
14 | if [ ! -r /etc/inetd.conf.O -o ! -w /etc/inetd.conf ]; then exit 1; fi
|
---|
15 |
|
---|
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
|
---|
20 |
|
---|
21 | #
|
---|
22 | # add SAMBA service ports to /etc/services
|
---|
23 | #
|
---|
24 | cp /etc/services /etc/services.O
|
---|
25 |
|
---|
26 | if [ $? -ne 0 ]; then exit 1; fi
|
---|
27 | if [ ! -r /etc/services.O -o ! -w /etc/services ]; then exit 1; fi
|
---|
28 |
|
---|
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
|
---|
33 |
|
---|
34 | #
|
---|
35 | # restart inetd to start SAMBA
|
---|
36 | #
|
---|
37 | /etc/killall -HUP inetd
|
---|
Note:
See
TracBrowser
for help on using the repository browser.