scummvm random work
[patches.git] / module-init-tools-3.2.2-try-more-tmpdirs.patch
1 If /tmp is readonly, try other places instead
2
3 http://bugs.gentoo.org/117212
4
5 --- module-init-tools-3.2.2/generate-modprobe.conf
6 +++ module-init-tools-3.2.2/generate-modprobe.conf
7 @@ -32,7 +32,10 @@
8 # Set up output if specified.
9 if [ $# -eq 1 ]; then exec > $1; fi
10
11 -MODPROBECONF=`mktemp /tmp/modprobe.XXXXXX || tempfile || echo /tmp/modprobe.$$`
12 +for d in $TMPDIR /tmp / ; do
13 + MODPROBECONF=`mktemp $d/modprobe.XXXXXX || tempfile -d $d || $d/modprobe.$$`
14 + touch $d && break
15 +done
16 trap "rm -f $MODPROBECONF" 0
17
18 modprobe_abort()