mirror of
https://github.com/samba-team/samba.git
synced 2025-01-07 17:18:11 +03:00
83574da44b
by Tim Towers <tim@lorien.demon.co.uk>. Note: Not yet checked.
(This used to be commit 332f78bbc9
)
31 lines
883 B
Bash
31 lines
883 B
Bash
#!/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
|
|
|