Package: iodine
Version: 0.4.0-3
Severity: normal
Tags: patch

The iodined 0.4.0-3 init script fails to restart iodined (at least
0.4.0-4 is affected, too):

# /etc/init.d/iodined restart
Restarting IP over DNS tunneling server: iodinedUsage: iodined [-v] [-h]
[-f] [-u user] [-t chrootdir] [-d device] [-m mtu] [-l ip address to
listen on] [-p port] [-P password] tunnel_ip topdomain failed!

'/etc/init.d/iodined stop && /etc/init.d/iodined start' works fine.
'restart' does not work because get_config is not being called before
do_start in the 'restart' branch. My patch moves the get_config call
into do_start, the only place where the configuration information is
actually needed.

diff -Nurp iodine-0.4.0-orig/debian/iodine.iodined.init 
iodine-0.4.0/debian/iodine.iodined.init
--- iodine-0.4.0-orig/debian/iodine.iodined.init        2007-11-26 
17:26:01.000000000 +0100
+++ iodine-0.4.0/debian/iodine.iodined.init     2007-11-26 17:29:13.000000000 
+0100
@@ -57,6 +57,8 @@ get_config() {
 #
 do_start()
 {
+       # populate $DAEMON_ARGS
+       get_config
        # Return
        #   0 if daemon has been started
        #   1 if daemon was already running
@@ -99,7 +101,6 @@ do_stop()
 
 case "$1" in
   start)
-       get_config
        [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
        do_start
        case "$?" in

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.22 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages iodine depends on:
ii  adduser                 3.105            add and remove users and groups
ii  debconf [debconf-2.0]   1.5.16           Debian configuration management sy
ii  libc6                   2.6.1-1+b1       GNU C Library: Shared libraries
ii  makedev                 2.3.1-84         creates device files in /dev
ii  udev                    0.114-2          /dev/ and hotplug management daemo
ii  zlib1g                  1:1.2.3.3.dfsg-6 compression library - runtime

iodine recommends no packages.

-- debconf information excluded



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

Reply via email to