Bug 58775 - Missing quotes in grub-0.90-installmktemp.patch
Summary: Missing quotes in grub-0.90-installmktemp.patch
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: grub   
(Show other bugs)
Version: 7.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-01-24 12:50 UTC by han.holl
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-01-24 12:50:33 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description han.holl 2002-01-24 12:50:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7+) Gecko/20020118

Description of problem:
The variable mkstemp can consist of more than one word.
Therefore
test -n $mkstemp
should be:
test -n "$mkstemp"

Version-Release number of selected component (if applicable):0.91


How reproducible:
Always

Steps to Reproduce:
1.Run grub-install
2.
3.
	

Actual Results:  Error message

Expected Results:  No error message

Additional info:

diff -ur grub-0.90/ChangeLog grub/ChangeLog
--- grub-0.90/ChangeLog Fri Aug 24 00:44:46 2001
+++ grub/ChangeLog      Fri Aug 24 00:34:59 2001
@@ -1,3 +1,7 @@
+2001-08-24  Jeremy Katz  <katzj@redhat.com>
+
+       * util/grub-install.in: use mktemp to generate log filename
+
 2001-08-02  Jeremy Katz  <katzj@redhat.com>
        * configure.in:
        link ncurses statically
diff -ur grub-0.90/util/grub-install.in grub/util/grub-install.in
--- grub-0.90/util/grub-install.in      Fri Aug 24 00:44:45 2001
+++ grub/util/grub-install.in   Fri Aug 24 00:46:00 2001
@@ -39,6 +39,16 @@
 recheck=no
 debug=no

+# look for secure tempfile creation wrappers on this platform
+if test -x /bin/tempfile
+    mkstemp="/bin/tempfile --prefix=grub"
+elif test -x /bin/mktemp; then
+    mkstemp="/bin/mktemp /tmp/grub-install.log.XXXXXX"
+else
+    mkstemp=""
+fi
+
+
 # Usage: usage
 # Print the usage.
 usage () {
@@ -268,7 +278,7 @@
     :
 else
     # Create a safe temporary file.
-    test -x /bin/tempfile && log_file=`tempfile --prefix=grub`
+    test -n "$mkstemp" && log_file=`$mkstemp`

     $grub_shell --batch --device-map=$device_map <<EOF >$log_file
 quit
@@ -342,7 +352,7 @@
 done

 # Create a safe temporary file.
-test -x /bin/tempfile && log_file=`tempfile --prefix=grub`
+test -n "$mkstemp" && log_file=`$mkstemp`

 # Now perform the installation.
 $grub_shell --batch --device-map=$device_map <<EOF >$log_file

Comment 1 Jeremy Katz 2002-01-28 01:50:42 UTC
Already fixed prior to upstreaming for inclusion in grub 0.91 and thus as of
grub-0.91-1 and later.


Note You need to log in before you can comment on or make changes to this bug.