* Weaken inetd Depends: to Recommends (Closes: #511564).
authorIan Beckwith <ianb@erislabs.net>
Fri, 27 Feb 2009 02:30:35 +0000 (02:30 +0000)
committerIan Beckwith <ianb@erislabs.net>
Fri, 27 Feb 2009 02:30:35 +0000 (02:30 +0000)
* postinst: if IKSD requested, complain if no inetd installed.
* templates: new template ckermit/iksd-no-inetd.

debian/changelog
debian/control
debian/postinst
debian/templates

index c23b9bf..6bd3b8c 100644 (file)
@@ -1,3 +1,11 @@
+ckermit (211-13) unstable; urgency=low
+
+  * Weaken inetd Depends: to Recommends (Closes: #511564).
+  * postinst: if IKSD requested, complain if no inetd installed.
+  * templates: new template ckermit/iksd-no-inetd.
+
+ -- Ian Beckwith <ianb@erislabs.net>  Fri, 27 Feb 2009 02:04:49 +0000
+
 ckermit (211-12) unstable; urgency=low
 
   * Add debian/README.source pointing to quilt docs.
index 4364421..e505629 100644 (file)
@@ -11,8 +11,8 @@ Homepage: http://www.kermit-project.org
 Package: ckermit
 Architecture: any
 Pre-Depends: debconf (>=0.2.17)
-Depends: openbsd-inetd | inet-superserver, ${misc:Depends}, ${shlibs:Depends}
-Recommends: openssh-client | ssh-client
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Recommends: openbsd-inetd | inet-superserver, openssh-client | ssh-client
 Description: a serial and network communications package
  C-Kermit is a combined serial and network communication software package
  offering a consistent, medium-independent, cross-platform approach to
index 4ccae54..cd9bce8 100644 (file)
@@ -12,22 +12,35 @@ iksd_args='-A --initfile:/etc/kermit/iksd-anon.conf --dbfile:/var/run/iksd.db --
 
 if [ "$1" = "configure" ]
 then
+    gotinetd=0
+    if [ -x "`which update-inetd 2>/dev/null`" ]; then
+       gotinetd=1
+    fi
+
     db_get ckermit/iksd || true
     if [ "$RET" = true ]
     then
-        prefix=""
-        db_get ckermit/iksd-anon || true
-        if [ "$RET" = true ]
-        then
-            anon="on"
-            db_get ckermit/iksd-anondir || true
-            dir="$RET"
+       if [ $gotinetd -eq 0 ]; then
+           db_fset ckermit/iksd seen false || true
+           db_input critical ckermit/iksd-no-inetd || true
+           db_go || true
+       else
+            prefix=""
+            db_get ckermit/iksd-anon || true
+            if [ "$RET" = true ]
+            then
+               anon="on"
+               db_get ckermit/iksd-anondir || true
+               dir="$RET"
+           fi
         fi
     fi
 
-    iksd_args="$iksd_args --root:$dir --anonymous:$anon"
-    update-inetd --remove "kermit"
-    update-inetd --add "$prefix$inetdentry $iksd_args"
+    if [ $gotinetd -eq 1 ]; then
+       iksd_args="$iksd_args --root:$dir --anonymous:$anon"
+       update-inetd --remove "kermit"
+       update-inetd --add "$prefix$inetdentry $iksd_args"
+    fi
 fi
 
 #DEBHELPER#
index d48185f..91f8470 100644 (file)
@@ -26,3 +26,11 @@ _Description: Directory for anonymous IKSD logins:
  into this directory on login. This directory will NOT be created.
  .
  The default is /home/ftp (same as wu-ftpd)
+
+Template: ckermit/iksd-no-inetd
+Type: error
+_Description: No inet daemon found, so IKSD cannot be configured.
+ Please install an inetd (e.g. openbsd-inetd) and then
+ reconfigure ckermit with:
+ .
+ dpkg-reconfigure ckermit