summaryrefslogtreecommitdiff
path: root/sys-apps/usb_modeswitch/files/usb_modeswitch.sh-tmpdir.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-apps/usb_modeswitch/files/usb_modeswitch.sh-tmpdir.patch
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-apps/usb_modeswitch/files/usb_modeswitch.sh-tmpdir.patch')
-rw-r--r--sys-apps/usb_modeswitch/files/usb_modeswitch.sh-tmpdir.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys-apps/usb_modeswitch/files/usb_modeswitch.sh-tmpdir.patch b/sys-apps/usb_modeswitch/files/usb_modeswitch.sh-tmpdir.patch
new file mode 100644
index 000000000000..5039d44da1fd
--- /dev/null
+++ b/sys-apps/usb_modeswitch/files/usb_modeswitch.sh-tmpdir.patch
@@ -0,0 +1,18 @@
+Script that this patch modifies and usb_modeswitch_dispatcher Tcl script
+that is being called by it both need a writable temporary directory which
+is a problematic requirement for example if usb_modeswitch is triggered
+by a module loaded during system startup.
+Fortunately, /run is available very early at boot so let's redirect them
+there instead.
+
+--- a/usb_modeswitch.sh 2016-11-29 17:29:47.000000000 +0100
++++ b/usb_modeswitch.sh 2016-11-30 01:11:51.747993839 +0100
+@@ -17,6 +17,8 @@
+ return 0
+ }
+
++export TMPDIR=/run
++
+ if [ $(expr "$1" : "--.*") ]; then
+ p_id=$4
+ if [ -z $p_id ]; then