Package: qmail-src
Version: 1.03-44
Tags: patch

Final binary package should depend on update-inetd package, as its prerm
script relies on DebianNet.pm, and on systems without inetd, update-inetd is
not normally installed.

Actually I should not...

As I personally prefer not to have update-inetd at all, I prepared a patch to
skip the dependency if smtp is not in /etc/inetd.conf (or it doesn't exist).

Thanks for your great work on maintaining the qmail-src package !

Pablo.



--- qmail.prerm-old
+++ qmail.prerm
@@ -1,6 +1,14 @@
 #!/usr/bin/perl
 
-require DebianNet;
+$hassmtpininetd = 0;
+if ( -e "/etc/inetd.conf" ) {
+    system('grep "^ *[^#].*\<smtp\>" /etc/inetd.conf');
+    if ( ! $? ) {
+        $hassmtpininetd = 1;
+    }
+}
+
+require DebianNet if ( $hassmtpininetd );
 
 $| = 1;
 
@@ -13,7 +21,7 @@
 if ( $action eq 'upgrade'  or $action eq 'deconfigure' ) {
     system("/etc/init.d/qmail stop");
     exit $? if $?;
-    DebianNet::disable_service('smtp');
+    DebianNet::disable_service('smtp') if ( $hassmtpininetd );
     exit 0;
 }
 
@@ -39,7 +47,7 @@
     }
 
     # Remove qmail-smtpd from inetd.conf
-    
DebianNet::remove_service('smtp\s+stream\s+tcp\s+nowait\s+qmaild.*/usr/sbin/qmail-smtpd');
+    
DebianNet::remove_service('smtp\s+stream\s+tcp\s+nowait\s+qmaild.*/usr/sbin/qmail-smtpd')
 if ( $hassmtpininetd );
     
     # Stop qmail process.
     system("/etc/init.d/qmail stop");


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to