usb_modeswitch.sh-tmpdir.patch 596 B

12345678910111213141516171819
  1. Script that this patch modifies and usb_modeswitch_dispatcher Tcl script
  2. that is being called by it both need a writable temporary directory which
  3. is a problematic requirement for example if usb_modeswitch is triggered
  4. by a module loaded during system startup.
  5. Fortunately, /run is available very early at boot so let's redirect them
  6. there instead.
  7. --- a/usb_modeswitch.sh 2016-11-29 17:29:47.000000000 +0100
  8. +++ b/usb_modeswitch.sh 2016-11-30 01:11:51.747993839 +0100
  9. @@ -17,6 +17,8 @@
  10. return 0
  11. }
  12. +export TMPDIR=/run
  13. +
  14. if [ $(expr "$1" : "--.*") ]; then
  15. p_id=$4
  16. if [ -z $p_id ]; then