add startswat.sh to automate starting swat with inetd
authorHerb Lewis <herb@samba.org>
Fri, 7 Aug 1998 18:56:12 +0000 (18:56 +0000)
committerHerb Lewis <herb@samba.org>
Fri, 7 Aug 1998 18:56:12 +0000 (18:56 +0000)
update make scripts to use new autoconfigure setup
(This used to be commit 737a58c1568fd76afe32a78895ee09b1543a595d)

packaging/SGI/idb.pl
packaging/SGI/mkrelease.sh
packaging/SGI/startswat.sh [new file with mode: 0755]

index 424c4ed13033705d5c13cdd828a69b7d6e45be85..a211322fa988ef2faa9c5584a07205d32a338d04 100755 (executable)
@@ -166,6 +166,7 @@ while (@sorted) {
   }
 }
 
+print IDB "f 0755 root sys usr/samba/startswat.sh packaging/SGI/startswat.sh samba.sw.base\n";
 print IDB "d 0755 root sys usr/samba/swat/ packaging/SGI/swat samba.sw.base\n";
 while (@swatfiles) {
   $nextfile = shift @swatfiles;
index e42f76e20758438f55f36157e03c643049c546f8..6f4b600f41c7e9fd8949d54118172e95e71f0804 100755 (executable)
@@ -11,12 +11,9 @@ if [ "$1" = "clean" ]; then
   shift
 fi
 
-echo Create SGI specific Makefile
-./makefile.pl $1               # create the Makefile for the specified OS ver
-
 if [ "$doclean" = "clean" ]; then
   cd ../../source
-  make -f ../packaging/SGI/Makefile clean
+  make clean
   cd ../packaging/SGI
   rm -rf bins catman html codepages swat samba.idb samba.spec
 fi
@@ -31,18 +28,26 @@ if [ $errstat -ne 0 ]; then
   exit $errstat;
 fi
 
-# build the sources
-#
-echo Making binaries
+cd ../../source
+echo Create SGI specific Makefile
+./configure --prefix=/usr --mandir=/usr/src/man
 errstat=$?
 if [ $errstat -ne 0 ]; then
   echo "Error $errstat creating Makefile\n";
   exit $errstat;
 fi
 
-cd ../../source
-# make -f ../packaging/SGI/Makefile clean
-make -f ../packaging/SGI/Makefile all
+
+# build the sources
+#
+echo Making binaries
+
+if [ "$1" = "5" ]; then
+  make "CFLAGS=-O -g3" all
+else
+  make "CFLAGS=-O -g3 -n32" all
+fi
+
 errstat=$?
 if [ $errstat -ne 0 ]; then
   echo "Error $errstat building sources\n";
@@ -73,5 +78,5 @@ if [ ! -d bins ]; then
 fi
 
 # do the packaging
-/usr/sbin/gendist -rbase / -sbase ../.. -idb samba.idb -spec samba.spec -dist ./bins -all
+/usr/sbin/gendist -rbase / -sbase ../.. -idb samba.idb -spec samba.spec -dist ./bins -nostrip -all
 
diff --git a/packaging/SGI/startswat.sh b/packaging/SGI/startswat.sh
new file mode 100755 (executable)
index 0000000..c2fc9fb
--- /dev/null
@@ -0,0 +1,21 @@
+#! /bin/sh
+#
+# add SWAT deamon to inetd.conf
+#
+cp /etc/inetd.conf /etc/inetd.O
+sed -e "/^swat/D" -e "/^#SWAT/D" /etc/inetd.O > /etc/inetd.conf
+echo '#SWAT services' >> /etc/inetd.conf
+echo swat stream tcp  nowait  root    /usr/samba/bin/swat swat >> /etc/inetd.conf
+
+#
+# add SWAT service port to /etc/services
+#
+cp /etc/services /etc/services.O
+sed -e "/^swat/D" -e "/^#SWAT/D" /etc/services.O > /etc/services
+echo '#SWAT services' >> /etc/services
+echo 'swat              901/tcp                         # SWAT' >> /etc/services
+
+#
+# restart inetd to start SWAT
+#
+/etc/killall -HUP inetd