Source: grub-legacy
Version: 0.97-67
Severity: normal
Tag: patch

Dear Maintainer,

It'd be convenient to place grub-install's temporary files in $TMPDIR
when set.  Right now they are placed in /tmp, which on a typical install 
is on the same partition as /; hence if for some reason / is mounted in
read-only mode, it's not possible to (re)install the boot-loader.

-- 
Guilhem.
--- a/grub-install.in
+++ b/grub-install.in
@@ -31,8 +31,8 @@
 
 grub_shell=${sbindir}/grub
 grub_set_default=${sbindir}/grub-set-default
-log_file=/tmp/grub-install.log.$$
-img_file=/tmp/grub-install.img.$$
+log_file="${TMPDIR:-/tmp}/grub-install.log.$$"
+img_file="${TMPDIR:-/tmp}/tmp/grub-install.img.$$"
 rootdir=
 grub_prefix=/boot/grub
 
@@ -47,8 +47,8 @@
     mklog="/bin/tempfile --prefix=grub"
     mkimg="/bin/tempfile --prefix=grub"
 elif test -x /bin/mktemp; then
-    mklog="/bin/mktemp /tmp/grub-install.log.XXXXXX"
-    mkimg="/bin/mktemp /tmp/grub-install.img.XXXXXX"
+    mklog="/bin/mktemp --tmdir grub-install.log.XXXXXX"
+    mkimg="/bin/mktemp --tmdir grub-install.img.XXXXXX"
 else
     mklog=""
     mkimg=""

Attachment: signature.asc
Description: Digital signature

Reply via email to