Package: nstx
Version: 1.1-beta6-2.1
Severity: wishlist
Tags: patch

        Hi,

 The attached patch permits choosing the name of the interface to ifup
 instead of forcing tun0.  I suggest you offer a way to execute some
 post-up commands, and remove the ifup calls instead though.

   Cheers,

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-686
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages nstx depends on:
ii  adduser                       3.67.2     Add and remove users and groups
ii  libc6                         2.3.5-6    GNU C Library: Shared libraries an

nstx recommends no packages.

-- no debconf information

-- 
Loïc Minier <[EMAIL PROTECTED]>
diff -urN nstx-1.1-beta6.orig/debian/changelog nstx-1.1-beta6/debian/changelog
--- nstx-1.1-beta6.orig/debian/changelog        2005-10-15 14:02:39.000000000 
+0200
+++ nstx-1.1-beta6/debian/changelog     2005-10-15 14:12:04.000000000 +0200
@@ -1,3 +1,9 @@
+nstx (1.1-beta6-2.2) unstable; urgency=low
+
+  * Permit ifuping any interface instead of hardcoding tun0.
+
+ -- Loic Minier <[EMAIL PROTECTED]>  Sat, 15 Oct 2005 14:11:40 +0200
+
 nstx (1.1-beta6-2.1) unstable; urgency=high
 
   * Non-maintainer upload.
diff -urN nstx-1.1-beta6.orig/debian/nstx.default 
nstx-1.1-beta6/debian/nstx.default
--- nstx-1.1-beta6.orig/debian/nstx.default     2005-10-15 14:02:39.000000000 
+0200
+++ nstx-1.1-beta6/debian/nstx.default  2005-10-15 14:11:30.000000000 +0200
@@ -19,4 +19,4 @@
 #start_nstxcd=yes
 
 # uncomment to bring up tun0 automatically
-#ifup_tun0=yes
\ No newline at end of file
+#ifup_tun=tun0
diff -urN nstx-1.1-beta6.orig/debian/nstx.nstxcd.init 
nstx-1.1-beta6/debian/nstx.nstxcd.init
--- nstx-1.1-beta6.orig/debian/nstx.nstxcd.init 2005-10-15 14:02:39.000000000 
+0200
+++ nstx-1.1-beta6/debian/nstx.nstxcd.init      2005-10-15 14:20:22.000000000 
+0200
@@ -33,6 +33,10 @@
        start-stop-daemon --start -b -m --quiet --pidfile /var/run/$NAME.pid \
                --exec $DAEMON -- $NSTX_DOMAIN $NSTX_DNS_SERVER
        sleep 1;
+       if [ -n "$ifup_tun" ]; then
+           ifup "$ifup_tun"
+       fi
+       # for backward compatibility
        if [ "$ifup_tun0" = "yes" ]; then
            ifup tun0
        fi
@@ -43,6 +47,10 @@
        ;;
   stop)
        echo -n "Stopping $DESC: "
+       if [ -n "$ifup_tun" ]; then
+           ifdown "$ifup_tun"
+       fi
+       # for backward compatibility
        if [ "$ifup_tun0" = "yes" ]; then
            ifdown tun0
        fi
@@ -57,6 +65,10 @@
        #       just the same as "restart".
        #
        echo -n "Restarting $DESC: "
+       if [ -n "$ifup_tun" ]; then
+           ifdown "$ifup_tun"
+       fi
+       # for backward compatibility
        if [ "$ifup_tun0" = "yes" ]; then
            ifdown tun0
        fi
@@ -67,6 +79,10 @@
            start-stop-daemon --start -b -m --quiet --pidfile \
                /var/run/$NAME.pid --exec $DAEMON -- $NSTX_DOMAIN 
$NSTX_DNS_SERVER
            sleep 1;
+            if [ -n "$ifup_tun" ]; then
+                ifup "$ifup_tun"
+            fi
+            # for backward compatibility
            if [ "$ifup_tun0" = "yes" ]; then
                ifup tun0
            fi
diff -urN nstx-1.1-beta6.orig/debian/nstx.nstxd.init 
nstx-1.1-beta6/debian/nstx.nstxd.init
--- nstx-1.1-beta6.orig/debian/nstx.nstxd.init  2005-10-15 14:02:39.000000000 
+0200
+++ nstx-1.1-beta6/debian/nstx.nstxd.init       2005-10-15 14:15:08.000000000 
+0200
@@ -34,6 +34,10 @@
        start-stop-daemon --start -b -m --quiet --pidfile /var/run/$NAME.pid \
                --exec $DAEMON -- $NSTX_OPTIONS $NSTX_DOMAIN 
        sleep 1;
+       if [ -n "$ifup_tun" ]; then
+           ifup "$ifup_tun"
+       fi
+       # for backward compatibility
        if [ "$ifup_tun0" = "yes" ]; then
            ifup tun0
        fi
@@ -44,6 +48,10 @@
        ;;
   stop)
        echo -n "Stopping $DESC: "
+       if [ -n "$ifup_tun" ]; then
+           ifdown "$ifup_tun"
+       fi
+       # for backward compatibility
        if [ "$ifup_tun0" = "yes" ]; then
            ifdown tun0
        fi
@@ -58,6 +66,10 @@
        #       just the same as "restart".
        #
        echo -n "Restarting $DESC: "
+       if [ -n "$ifup_tun" ]; then
+           ifdown "$ifup_tun"
+       fi
+       # for backward compatibility
        if [ "$ifup_tun0" = "yes" ]; then
            ifdown tun0
        fi
@@ -68,6 +80,10 @@
            start-stop-daemon --start -b -m --quiet --pidfile \
                /var/run/$NAME.pid --exec $DAEMON -- $NSTX_OPTIONS $NSTX_DOMAIN
            sleep 1;
+            if [ -n "$ifup_tun" ]; then
+                ifup "$ifup_tun"
+            fi
+            # for backward compatibility
            if [ "$ifup_tun0" = "yes" ]; then
                ifup tun0
            fi

Reply via email to