diff -ur redhat.orig/SPECS/proftpd.spec redhat/SPECS/proftpd.spec --- redhat.orig/SPECS/proftpd.spec 2010-02-25 02:54:53.000000000 +0900 +++ redhat/SPECS/proftpd.spec 2010-02-26 08:11:19.000000000 +0900 @@ -157,7 +157,7 @@ %package inetd Summary: ProFTPD -- Setup for inetd/xinetd operation. Group: System Environment/Daemons -Requires: proftpd, inetd +Requires: proftpd Obsoletes: proftpd-standalone %description inetd @@ -292,55 +292,6 @@ mv $tmpfile /etc/proftpd.conf fi -%post inetd - # Force the "ServerType" directive for this operation type. - tmpfile=/tmp/proftpd-conf.$$ - sed -e '/ServerType/c\' \ - -e 'ServerType inetd' \ - /etc/proftpd.conf >$tmpfile - mv $tmpfile /etc/proftpd.conf - - if [ -f /etc/inetd.conf ]; then - # Look if there is already an entry for 'ftp' service even when commented. - grep '^[#[:space:]]*ftp' /etc/inetd.conf >/dev/null - errcode=$? - if [ $errcode -eq 0 ]; then - # Found, replace the 'in.ftpd' with 'in.proftpd' - tmpfile=/tmp/proftpd-inetd.$$ - sed -e '/^[#[:space:]]*ftp/{' \ - -e 's^in.ftpd.*$^in.proftpd^' \ - -e '}' \ - /etc/inetd.conf >$tmpfile - mv $tmpfile /etc/inetd.conf - else - # Not found, append a new entry. - echo 'ftp stream tcp nowait root /usr/sbin/tcpd in.proftpd' >>/etc/inetd.conf - fi - # Reread 'inetd.conf' file. - killall -HUP inetd || : - else - killall -HUP xinetd || : - fi - -%postun inetd - if [ "$1" = 0 ]; then - # Return the ServerType to standalone when the inetd subpackage is - # uninstalled. - tmpfile=/tmp/proftpd-conf.$$ - sed -e '/ServerType/c\' \ - -e 'ServerType standalone' \ - /etc/proftpd.conf >$tmpfile - mv $tmpfile /etc/proftpd.conf - - if [ -f /etc/inetd.conf ]; then - # Remove ProFTPD entry from /etc/inetd.conf - tmpfile=/tmp/proftpd-inetd.$$ - sed -e '/^.*proftpd.*$/d' /etc/inetd.conf >$tmpfile - mv $tmpfile /etc/inetd.conf - killall -HUP inetd || : - fi - fi - %clean rm -rf $RPM_BUILD_ROOT rm -rf %{_builddir}/%{name}-%{version}