summaryrefslogtreecommitdiff
path: root/packaging/Solaris/pkg-specs/postinstall
diff options
context:
space:
mode:
authorJohn Terpstra <jht@samba.org>1997-10-04 02:57:14 +0000
committerJohn Terpstra <jht@samba.org>1997-10-04 02:57:14 +0000
commit83574da44b649ecc2bf163109ffbae5e21eef649 (patch)
treefde68f06f16bf02c26930652aa80f45d9d21e329 /packaging/Solaris/pkg-specs/postinstall
parente722d7077695242a7d6c0749b9a63741f660382a (diff)
downloadsamba-83574da44b649ecc2bf163109ffbae5e21eef649.tar.gz
samba-83574da44b649ecc2bf163109ffbae5e21eef649.tar.bz2
samba-83574da44b649ecc2bf163109ffbae5e21eef649.zip
JHT ===> Added Sun Solaris binary package building spec files contributed
by Tim Towers <tim@lorien.demon.co.uk>. Note: Not yet checked. (This used to be commit 332f78bbc945c327069e9c9e29c7137c8cbd5c02)
Diffstat (limited to 'packaging/Solaris/pkg-specs/postinstall')
-rw-r--r--packaging/Solaris/pkg-specs/postinstall37
1 files changed, 37 insertions, 0 deletions
diff --git a/packaging/Solaris/pkg-specs/postinstall b/packaging/Solaris/pkg-specs/postinstall
new file mode 100644
index 0000000000..0fbe9da10b
--- /dev/null
+++ b/packaging/Solaris/pkg-specs/postinstall
@@ -0,0 +1,37 @@
+#!/bin/sh
+# install samba
+
+nawk '/^netbios-[ns]*[ ]/ {next}
+{print}
+END { print "netbios-ssn 139/tcp"
+ print "netbios-ns 137/udp # samba service" }' \
+ ${PKG_INSTALL_ROOT}/etc/inet/services > /tmp/services.$$ && \
+ mv -f /tmp/services.$$ ${PKG_INSTALL_ROOT}/etc/inet/services &&
+\
+ chmod 644 ${PKG_INSTALL_ROOT}/etc/inet/services && \
+ echo "Updated ${PKG_INSTALL_ROOT}/etc/inet/services"
+
+nawk '/samba.*mbd[ ]/ { next }
+{print}
+END { print "# samba connections are handled by smbd and nmbd"
+ print "netbios-ssn stream tcp nowait root /opt/samba/bin/smbd
+smbd"
+ print "netbios-ns dgram udp wait root /opt/samba/bin/nmbd nmbd" }'
+\
+ ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf > /tmp/inetd.conf.$$ &&
+\
+ mv -f /tmp/inetd.conf.$$ ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf
+&& \
+ chmod 644 ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf && \
+ echo "Updated ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf"
+
+echo "Installed samba service into ${PKG_INSTALL_ROOT:-/}"
+
+inetpid=`/bin/ps -ef | awk '/ \/usr\/sbin\/inetd / { print $2 } '`
+if [ "X$inetpid" = "X" ]; then
+ echo "inetd not running"
+else
+ echo "Restarting inetd($inetpid)"
+ kill -HUP $inetpid
+fi
+