~zulcss/samba/server-dailies-3.4

« back to all changes in this revision

Viewing changes to packaging/SGI/inetd.sh

  • Committer: Chuck Short
  • Date: 2010-09-28 20:38:39 UTC
  • Revision ID: zulcss@ubuntu.com-20100928203839-pgjulytsi9ue63x1
Initial version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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