Fix lintian-warning: init.d-script-does-not-source-init-functions
authorDarshaka Pathirana <dpat@syn-net.org>
Sun, 30 Apr 2017 18:44:05 +0000 (20:44 +0200)
committerDarshaka Pathirana <dpat@syn-net.org>
Wed, 3 May 2017 10:31:51 +0000 (12:31 +0200)
The /etc/init.d/uanytun script does not source /lib/lsb/init-functions. The
systemd package provides /lib/lsb/init-functions.d/40-systemd to redirect
/etc/init.d/$script calls to systemctl.

When a init script sources the /lib/lsb/init-functions utility
we have to declare a dependency on lsb-base (>= 3.0-6).

This patch includes an upstream commit which was commited after the release of v0.3.6
Source: https://git.spreadspace.org/anytun/uanytun.git/commit/?id=e84f028444822b2a185395a640c5e12da4db8454

debian/control
debian/patches/01_source-init-functions.diff [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]

index 2e2c43d..51e23ae 100644 (file)
@@ -13,6 +13,7 @@ Vcs-Browser: https://git.syn-net.org/?p=debian/uanytun.git
 Package: uanytun
 Architecture: any
 Depends: adduser,
+         lsb-base (>= 3.0-6),
          ${misc:Depends},
          ${shlibs:Depends}
 Description: tiny implementation of the secure anycast tunneling protocol
diff --git a/debian/patches/01_source-init-functions.diff b/debian/patches/01_source-init-functions.diff
new file mode 100644 (file)
index 0000000..88f74b9
--- /dev/null
@@ -0,0 +1,22 @@
+From e84f028444822b2a185395a640c5e12da4db8454 Mon Sep 17 00:00:00 2001
+From: Christian Pointner <equinox@anytun.org>
+Date: Mon, 16 Jan 2017 05:53:34 +0100
+Subject: source init-functions at initscript
+
+
+diff --git a/etc/init.d/uanytun b/etc/init.d/uanytun
+index 9071e5a..b8a8573 100755
+--- a/etc/init.d/uanytun
++++ b/etc/init.d/uanytun
+@@ -22,6 +22,8 @@ if [ -f /etc/default/uanytun ] ; then
+   . /etc/default/uanytun
+ fi
++. /lib/lsb/init-functions
++
+ start_vpn () {
+   STATUS="OK"
+   if [ -f $CONFIG_DIR/$VPNNAME/config ] ; then
+-- 
+cgit v0.10.2
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..0417c8c
--- /dev/null
@@ -0,0 +1 @@
+01_source-init-functions.diff