[PATCH] UnSWATify packaging

Andreas Schneider asn at samba.org
Tue May 9 14:36:43 UTC 2017


Review and push appreciated.

Thanks,


	Andreas


-- 
Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at samba.org
www.samba.org
-------------- next part --------------
>From b3b2ca461f98ece5bcd4bbb1f77b9c57b89ddece Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn at samba.org>
Date: Tue, 9 May 2017 16:33:49 +0200
Subject: [PATCH] packaging: Remove SWAT references from Solaris

Signed-off-by: Andreas Schneider <asn at samba.org>
---
 packaging/Solaris/i.swat            | 44 -------------------------------------
 packaging/Solaris/inetd.conf.master |  1 -
 packaging/Solaris/makepkg.sh        | 31 ++++----------------------
 packaging/Solaris/prototype.master  |  9 --------
 packaging/Solaris/r.swat            | 16 --------------
 packaging/Solaris/request           |  4 ----
 packaging/Solaris/services          |  1 -
 7 files changed, 4 insertions(+), 102 deletions(-)
 delete mode 100644 packaging/Solaris/i.swat
 delete mode 100644 packaging/Solaris/inetd.conf.master
 delete mode 100644 packaging/Solaris/r.swat
 delete mode 100644 packaging/Solaris/services

diff --git a/packaging/Solaris/i.swat b/packaging/Solaris/i.swat
deleted file mode 100644
index d07d2798d85..00000000000
--- a/packaging/Solaris/i.swat
+++ /dev/null
@@ -1,44 +0,0 @@
-while read src dest 
-do
-	sed -e '/^swat.*swat$/d' $dest >/tmp/$$swat || exit 2
-	cat $src >>/tmp/$$swat || exit 2
-
-	# Use cp;rm instead of mv because $dest might be a symlink
-	cp -f /tmp/$$swat $dest || exit 2
-	rm -f /tmp/$$swat
-done
-
-if [ "$1" = ENDOFCLASS ]
-then
-	
-	# If local install, restart inetd
-	if [ -z "${PKG_INSTALL_ROOT}" ]
-	then
-		TARGET=`hostname`
-		kill -HUP `ps -e -o pid,comm | grep inetd | awk '{print $1}'`
-	else
-		TARGET="<servername>"
-	fi
-
-	cat <<EOF
-The Samba Web Administration Tool (SWAT) has been installed on your system.
-You can connect to it from a web browser on TCP port 901 at 
-http://${TARGET}:901/.
-
-If you use NIS/NIS+, check the ${PKG_INSTALL_ROOT}/etc/nsswitch.conf file
-to verify that the local services file is being used as a backend for the
-services database, or you won't be able to connect to the Samba Admin Tool.
-
-EOF
-
-	if [ ! -z "$PKG_INSTALL_ROOT" ]
-	then
-		cat <<EOF
-The SWAT settings will not take effect till you send a hangup (HUP) signal 
-to inetd on the target system.
-
-EOF
-	fi
-
-fi
-
diff --git a/packaging/Solaris/inetd.conf.master b/packaging/Solaris/inetd.conf.master
deleted file mode 100644
index b11fb7c3db2..00000000000
--- a/packaging/Solaris/inetd.conf.master
+++ /dev/null
@@ -1 +0,0 @@
-swat	stream	tcp	nowait.400	root	__BASEDIR__/samba/bin/swat swat
diff --git a/packaging/Solaris/makepkg.sh b/packaging/Solaris/makepkg.sh
index 83484132158..7d7ffbb5364 100644
--- a/packaging/Solaris/makepkg.sh
+++ b/packaging/Solaris/makepkg.sh
@@ -8,7 +8,7 @@
 
 INSTALL_BASE=/opt/samba
 
-SBINPROGS="smbd nmbd winbindd swat"
+SBINPROGS="smbd nmbd winbindd"
 BINPROGS="findsmb nmblookup eventlogadm pdbedit rpcclient smbclient smbcquotas smbspool smbtar tdbbackup testparm wbinfo net ntlm_auth profiles smbcacls smbcontrol smbpasswd smbstatus smbtree tdbdump"
 MSGFILES="de.msg en.msg fi.msg fr.msg it.msg ja.msg nl.msg pl.msg tr.msg"
 VFSLIBS="audit.so default_quota.so extd_audit.so full_audit.so readonly.so shadow_copy.so cap.so expand_msdfs.so fake_perms.so netatalk.so recycle.so"
@@ -17,7 +17,7 @@ AUTHLIBS="script.so"
 
 add_dynamic_entries() 
 {
-	# Add the binaries, docs and SWAT files
+	# Add the binaries and docs
 	cd $TMPINSTALLDIR/$INSTALL_BASE
 
 	echo "#\n# Server Binaries \n#"	
@@ -80,28 +80,6 @@ add_dynamic_entries()
 			done
 		fi
 	done
-	cd ../..
-
-	echo "#\n# SWAT \n#"
-	list=`find swat -type d | grep -v "/.svn$"`
-	for dir in $list; do
-		if [ -d $dir ]; then
-			echo d none $dir 0755 root other
-		fi
-	done
-
-	list=`find swat -type f | grep -v /.svn/`
-	for file in $list; do
-		if [ -f $file ]; then
-			echo f none $file 0644 root other
-		fi
-	done
-
-	# Create entries for docs for the beginner
-	echo 's none docs/using_samba=$BASEDIR/swat/using_samba'
-	for file in docs/*pdf; do
-		echo f none $file 0644 root other
-	done
 }
 
 #####################################################################
@@ -155,7 +133,6 @@ LD_LIBRARY_PATH=$DISTR_BASE/source/bin
 export LD_LIBRARY_PATH
 SBINDIR=`bin/smbd -b | grep SBINDIR | awk '{print $2}'`
 BINDIR=`bin/smbd -b | grep BINDIR | grep -v SBINDIR |  awk '{print $2}'`
-SWATDIR=`bin/smbd -b | grep SWATDIR | awk '{print $2}'`
 CONFIGFILE=`bin/smbd -b | grep CONFIGFILE | awk '{print $2}'`
 LOCKDIR=`bin/smbd -b | grep LOCKDIR | awk '{print $2}'`
 CONFIGDIR=`dirname $CONFIGFILE`
@@ -202,7 +179,7 @@ sed -e "s|__BASEDIR__|$INSTALL_BASE|g" samba.init.master > samba.init
 ## copy over some scripts need for packagaing
 ##
 mkdir -p $TMPINSTALLDIR/$INSTALL_BASE/scripts
-for i in inetd.conf samba.init smb.conf.default services; do
+for i in samba.init smb.conf.default; do
 	cp -fp $i $TMPINSTALLDIR/$INSTALL_BASE/scripts
 done
 
@@ -223,7 +200,7 @@ cp prototype.master prototype
 ##
 ## copy packaging files 
 ##
-for i in prototype pkginfo copyright preremove postinstall request i.swat r.swat; do
+for i in prototype pkginfo copyright preremove postinstall request; do
 	cp $i $TMPINSTALLDIR/$INSTALL_BASE
 done
 
diff --git a/packaging/Solaris/prototype.master b/packaging/Solaris/prototype.master
index 6cf1cc717df..ec9f76d94bc 100644
--- a/packaging/Solaris/prototype.master
+++ b/packaging/Solaris/prototype.master
@@ -6,8 +6,6 @@ i copyright=./copyright
 # i request=./request
 i preremove=./preremove
 i postinstall=./postinstall
-i i.swat=./i.swat
-i r.swat=./r.swat
 #
 # Stuff that goes into the system areas of the filesystem.
 #
@@ -17,12 +15,6 @@ f initscript /etc/init.d/samba=scripts/samba.init 0744 root sys
 d initscript /etc/rc3.d ? ? ?
 f initscript /sbin/samba=scripts/samba.init 0750 root root
 #
-# Stuff to set up SWAT
-#
-d swat /etc/inet ? ? ?
-e swat /etc/inet/services=scripts/services ? ? ?
-e swat /etc/inet/inetd.conf=scripts/inetd.conf ? ? ?
-#
 # Create the samba subtree.
 #
 d none docs 755 root other
@@ -36,7 +28,6 @@ d none lib 0755 root other
 d none lib/charset 0755 root other
 d none lib/vfs 0755 root other
 d none include 0755 root other
-d none swat 0755 root other
 d none $LOGFILEBASE 0755 root other
 d none $PIDDIR 0755 root other
 #
diff --git a/packaging/Solaris/r.swat b/packaging/Solaris/r.swat
deleted file mode 100644
index 11c776646da..00000000000
--- a/packaging/Solaris/r.swat
+++ /dev/null
@@ -1,16 +0,0 @@
-while read dest
-do
-	sed -e '/^swat.*swat$/d' $dest >/tmp/$$swat || exit 2
-	# Use cp;rm; instead of mv because $dest might be a symlink
-	cp -f /tmp/$$swat $dest || exit 2
-	rm -f /tmp/$$swat
-done
-
-if [ "$1" = ENDOFCLASS ]
-then
-	if [ -z "$PKG_INSTALL_ROOT" ]
-	then
-		kill -HUP `ps -e -o pid,comm | grep inetd | awk '{print $1}'`
-	fi
-fi
-
diff --git a/packaging/Solaris/request b/packaging/Solaris/request
index 59cdd0ab22a..f9cfb597729 100644
--- a/packaging/Solaris/request
+++ b/packaging/Solaris/request
@@ -6,10 +6,6 @@ resp=`ckyorn -d y -p "Do you wish to have Samba start whenever the system boots
 $VALSTR -r "^[yY]" $resp
 [ $? -eq 0 ] && CLASSES="$CLASSES initscript"
 
-resp=`ckyorn -d y -p "Do you wish to set up the Samba Web Admin Tool (SWAT)? (default:y) " -Q`
-$VALSTR -r "^[yY]" $resp
-[ $? -eq 0 ] && CLASSES="$CLASSES swat"
-
 cat >$1 <<!
 CLASSES=$CLASSES
 !
diff --git a/packaging/Solaris/services b/packaging/Solaris/services
deleted file mode 100644
index fc691200c8d..00000000000
--- a/packaging/Solaris/services
+++ /dev/null
@@ -1 +0,0 @@
-swat		901/tcp				# Samba Web Admin Tool - swat
-- 
2.12.2



More information about the samba-technical mailing list