1while read src dest 2do 3 sed -e '/^swat.*swat$/d' $dest >/tmp/$$swat || exit 2 4 cat $src >>/tmp/$$swat || exit 2 5 6 # Use cp;rm instead of mv because $dest might be a symlink 7 cp -f /tmp/$$swat $dest || exit 2 8 rm -f /tmp/$$swat 9done 10 11if [ "$1" = ENDOFCLASS ] 12then 13 14 # If local install, restart inetd 15 if [ -z "${PKG_INSTALL_ROOT}" ] 16 then 17 TARGET=`hostname` 18 kill -HUP `ps -e -o pid,comm | grep inetd | awk '{print $1}'` 19 else 20 TARGET="<servername>" 21 fi 22 23 cat <<EOF 24The Samba Web Administration Tool (SWAT) has been installed on your system. 25You can connect to it from a web browser on TCP port 901 at 26http://${TARGET}:901/. 27 28If you use NIS/NIS+, check the ${PKG_INSTALL_ROOT}/etc/nsswitch.conf file 29to verify that the local services file is being used as a backend for the 30services database, or you won't be able to connect to the Samba Admin Tool. 31 32EOF 33 34 if [ ! -z "$PKG_INSTALL_ROOT" ] 35 then 36 cat <<EOF 37The SWAT settings will not take effect till you send a hangup (HUP) signal 38to inetd on the target system. 39 40EOF 41 fi 42 43fi 44 45