diff options
author | Didier Raboud <odyx@debian.org> | 2016-08-30 14:24:06 +0200 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2018-02-23 20:56:18 +0100 |
commit | 048e0ff6edc1121d688856a34383367ea2018197 (patch) | |
tree | 79f07143a363fb2f2425768d96829b40705a9da7 | |
parent | ae0994c2199313d82fa06d2f6c08d509704f54da (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 f5f2f70..1f0c57e 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" |