~bug-zappers/ubuntu/lucid/samba/bugzapping

« back to all changes in this revision

Viewing changes to packaging/SGI/startswat.sh

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2004-10-15 12:31:58 UTC
  • Revision ID: james.westby@ubuntu.com-20041015123158-aokykzdqkdgy6dfx
Tags: upstream-3.0.7
ImportĀ upstreamĀ versionĀ 3.0.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
#
 
3
# add SWAT deamon to inetd.conf
 
4
#
 
5
cp /etc/inetd.conf /etc/inetd.conf.O
 
6
 
 
7
if [ $? -ne 0 ]; then exit 1; fi
 
8
if [ ! -r /etc/inetd.conf.O -o ! -w /etc/inetd.conf ]; then exit 1; fi
 
9
 
 
10
sed -e "/^swat/D" -e "/^#SWAT/D" /etc/inetd.conf.O > /etc/inetd.conf
 
11
echo '#SWAT services' >> /etc/inetd.conf
 
12
echo swat stream tcp  nowait  root    /usr/samba/bin/swat swat >> /etc/inetd.conf
 
13
 
 
14
#
 
15
# add SWAT service port to /etc/services
 
16
#
 
17
cp /etc/services /etc/services.O
 
18
 
 
19
if [ $? -ne 0 ]; then exit 1; fi
 
20
if [ ! -r /etc/services.O -o ! -w /etc/services ]; then exit 1; fi
 
21
 
 
22
sed -e "/^swat/D" -e "/^#SWAT/D" /etc/services.O > /etc/services
 
23
echo '#SWAT services' >> /etc/services
 
24
echo 'swat              901/tcp                         # SWAT' >> /etc/services
 
25
 
 
26
#
 
27
# restart inetd to start SWAT
 
28
#
 
29
/etc/killall -HUP inetd