samba-1.9.18p10 - Solaris 2.6, postinstall and postremove scripts
Anthony Duckworth
ant at logical.com.na
Mon Oct 5 11:49:50 GMT 1998
Greetings all,
See below for postinstall and remove scripts for the above release for
those
who may have wondered why they didn't work. Minor changes, but those
below
work.
Find these scripts in ../samba-1.9.18p10/packaging/Solaris/pkg-specs.
Regards
Anthnoy
::::::::::::::
postinstall
::::::::::::::
#!/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
::::::::::::::
postremove
::::::::::::::
#!/bin/sh
# remove samba
nawk '/^netbios-[ns]*[ ]/ {next}
{print} ' \
${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} ' \
${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 "Removed samba service from ${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
--
Anthony Duckworth
Logical Network Services
PO Box 22772, Windhoek, Namibia
Tel: +264 61 205 8227 (direct)
+264 61 205 8111 (S/board)
Fax: +264 61 205 8246
More information about the samba
mailing list