diff options
author | Didier Raboud <odyx@debian.org> | 2016-08-30 14:24:06 +0200 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2019-12-06 17:47:14 +0100 |
commit | dd3e676fcdd4109913b308577a8b66dade2ea764 (patch) | |
tree | f22ee207bd3be3e9e999aa8872069899cc3fb830 | |
parent | 5179506fdc82103709d84db87aa3d69bc3b82205 (diff) |
Set TMPDIR=/run for usb_modeswitch_dispatcher
It might be run before /tmp/ is available.
Gbp-Pq: Name 0004-Set-TMPDIR-run-for-usb_modeswitch_dispatcher.patch
-rw-r--r-- | usb-modeswitch-upstart.conf | 1 | ||||
-rwxr-xr-x | usb_modeswitch.sh | 1 | ||||
-rw-r--r-- | usb_modeswitch@.service | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/usb-modeswitch-upstart.conf b/usb-modeswitch-upstart.conf index 0d82b69..1fda4ba 100644 --- a/usb-modeswitch-upstart.conf +++ b/usb-modeswitch-upstart.conf @@ -1,5 +1,6 @@ start on usb-modeswitch-upstart task +env TMPDIR=/run script exec /usr/sbin/usb_modeswitch_dispatcher --switch-mode $UMS_PARAM end script diff --git a/usb_modeswitch.sh b/usb_modeswitch.sh index 57c2dfe..4ab5cab 100755 --- a/usb_modeswitch.sh +++ b/usb_modeswitch.sh @@ -47,6 +47,7 @@ case "$1" in device_in "link_list" $v_id $p_id if [ "$?" = "1" ]; then if [ -e "/usr/sbin/usb_modeswitch_dispatcher" ]; then + export TMPDIR=/run exec usb_modeswitch_dispatcher $1 $2 2>>/dev/null fi fi diff --git a/usb_modeswitch@.service b/usb_modeswitch@.service index f74a8bf..182604a 100644 --- a/usb_modeswitch@.service +++ b/usb_modeswitch@.service @@ -5,4 +5,5 @@ Description=USB_ModeSwitch_%i Type=oneshot ExecStart=/usr/sbin/usb_modeswitch_dispatcher --switch-mode %i #ExecStart=/bin/echo %i +Environment="TMPDIR=/run" |