Bug 17898 - mkkickstart fails when pwd is read-only
mkkickstart fails when pwd is read-only
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: mkkickstart (Show other bugs)
7.0
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Matt Wilson
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-09-26 18:23 EDT by Need Real Name
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-10-02 23:18:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to fix errors generated by creating temp files (1.17 KB, patch)
2000-09-26 18:25 EDT, Need Real Name
no flags Details | Diff

  None (edit)
Description Need Real Name 2000-09-26 18:23:10 EDT
mkkickstart-2.3-1 fails when the current working directory cannot be
written to.
this patch tries to make the temporary files in /tmp, which is more likely
mounted read-write.
also, it tests to make sure mktemp succeeds before proceeding. 

(this is the first bug report i've done under this system.  let me know if
posting a patch
here is inappropriate.)
------------snip-----------------------------------
*** mkkickstart Tue Sep 26 16:19:31 2000
--- mkkickstart.old     Tue Aug 15 07:37:53 2000
***************
*** 172,192 ****
  #
  # Get current disk partitioning information
  #
! tmp1=`mktemp /tmp/.tmp1.XXXXXX`
! if [ $? -ne 0 ]; then
!     echo "$0: can't create temp file in /tmp, exiting..."
!     exit 1
! fi
! tmp2=`mktemp /tmp/.tmp2.XXXXXX`
! if [ $? -ne 0 ]; then
!     echo "$0: can't create temp file in /tmp, exiting..."
!     exit 1
! fi
! tmp3=`mktemp /tmp/.tmp3.XXXXXX`
! if [ $? -ne 0 ]; then
!     echo "$0: can't create temp file in /tmp, exiting..."
!     exit 1
! fi
  fdisk -l /dev/hd[a-h] 2>/dev/null | grep "^/dev/[shx]da" | sort  >${tmp1} 
  fdisk -l /dev/sd[a-p] 2>/dev/null | grep "^/dev/[shx]da" | sort >>${tmp1} 
  fdisk -l /dev/xd[ab]  2>/dev/null | grep "^/dev/[shx]da" | sort >>${tmp1} 
--- 172,180 ----
  #
  # Get current disk partitioning information
  #
! tmp1=`mktemp .tmp1.XXXXXX`
! tmp2=`mktemp .tmp2.XXXXXX`
! tmp3=`mktemp .tmp3.XXXXXX`
  fdisk -l /dev/hd[a-h] 2>/dev/null | grep "^/dev/[shx]da" | sort  >${tmp1} 
  fdisk -l /dev/sd[a-p] 2>/dev/null | grep "^/dev/[shx]da" | sort >>${tmp1} 
  fdisk -l /dev/xd[ab]  2>/dev/null | grep "^/dev/[shx]da" | sort >>${tmp1} 

----------------snip-------------------
Comment 1 Need Real Name 2000-09-26 18:25:05 EDT
Created attachment 3571 [details]
patch to fix errors generated by creating temp files
Comment 2 Alan Cox 2000-10-01 18:40:10 EDT
Its intentionally not using /tmp. mktemp isnt enough to make it safe as far as I
can tell. So rather
than run tmpfile races we use current directories.
Comment 3 Brent Fox 2002-06-04 22:49:08 EDT
Closing since we don't ship mkkickstart anymore.

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