summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Sergey Kvachonok <ravenexp@gmail.com> 2017-08-08 11:15:51 +0300
committerAvatar Heiko Becker <heirecka@exherbo.org> 2017-08-13 09:48:17 +0200
commit9417d0a235f143479d7431a8da6ff629ad261395 (patch)
treef0f62b73153bae40fe7f595b4e983bbf584d504a
parent388c51030b3bac0d58952c9334045d8574276c8b (diff)
downloadnet-9417d0a235f143479d7431a8da6ff629ad261395.tar.gz
net-9417d0a235f143479d7431a8da6ff629ad261395.tar.xz
usb-modeswitch: Bump to 2.5.1
Change-Id: I6f0b96423b1b18340514f4cf4132632454e23785 Reviewed-on: https://galileo.mailstation.de/gerrit/9791 Reviewed-by: Jenkins <wk@mailstation.de> Reviewed-by: Heiko Becker <heirecka@exherbo.org>
-rw-r--r--packages/net-dialup/usb-modeswitch/files/0001-Use-realpath-instead-of-readlink-to-detect-init.patch31
-rw-r--r--packages/net-dialup/usb-modeswitch/usb-modeswitch-2.5.1.exheres-0 (renamed from packages/net-dialup/usb-modeswitch/usb-modeswitch-2.5.0.exheres-0)3
2 files changed, 34 insertions, 0 deletions
diff --git a/packages/net-dialup/usb-modeswitch/files/0001-Use-realpath-instead-of-readlink-to-detect-init.patch b/packages/net-dialup/usb-modeswitch/files/0001-Use-realpath-instead-of-readlink-to-detect-init.patch
new file mode 100644
index 0000000..12cf1ad
--- /dev/null
+++ b/packages/net-dialup/usb-modeswitch/files/0001-Use-realpath-instead-of-readlink-to-detect-init.patch
@@ -0,0 +1,31 @@
+Upstream: no (submitted)
+Reason: usb_modeswitch was broken when using systemd
+
+From 84c3555f3ff828b9b3105d454d79a63a13c8b996 Mon Sep 17 00:00:00 2001
+From: Sergey Kvachonok <ravenexp@gmail.com>
+Date: Tue, 8 Aug 2017 12:00:29 +0300
+Subject: [PATCH] Use realpath instead of readlink to detect init.
+
+readlink only follows a symlink once.
+Some setups have more than one level of indirection between /sbin/init
+and /usr/lib/systemd/systemd.
+---
+ usb_modeswitch.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usb_modeswitch.sh b/usb_modeswitch.sh
+index 999ca4c..5893622 100755
+--- a/usb_modeswitch.sh
++++ b/usb_modeswitch.sh
+@@ -62,7 +62,7 @@ if [ "$p2" = "" -a "$p1" != "" ]; then
+ fi
+
+ PATH=/bin:/sbin:/usr/bin:/usr/sbin
+-init_path=`readlink /sbin/init`
++init_path=`realpath /sbin/init`
+ if [ `basename $init_path` = "systemd" ]; then
+ systemctl --no-block start usb_modeswitch@$p2.service
+ elif [ -e "/etc/init/usb-modeswitch-upstart.conf" ]; then
+--
+2.14.0
+
diff --git a/packages/net-dialup/usb-modeswitch/usb-modeswitch-2.5.0.exheres-0 b/packages/net-dialup/usb-modeswitch/usb-modeswitch-2.5.1.exheres-0
index fe0fee7..fef721a 100644
--- a/packages/net-dialup/usb-modeswitch/usb-modeswitch-2.5.0.exheres-0
+++ b/packages/net-dialup/usb-modeswitch/usb-modeswitch-2.5.1.exheres-0
@@ -21,6 +21,9 @@ DEPENDENCIES="
net-dialup/usb-modeswitch-data[>=20160803]
"
+DEFAULT_SRC_PREPARE_PATCHES=(
+ "${FILES}"/0001-Use-realpath-instead-of-readlink-to-detect-init.patch
+ )
DEFAULT_SRC_COMPILE_PARAMS=( CC="${CC}" )
DEFAULT_SRC_INSTALL_PARAMS=(
SBINDIR="${IMAGE}"/usr/$(exhost --target)/bin