Bug 17898 - mkkickstart fails when pwd is read-only
Summary: mkkickstart fails when pwd is read-only
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mkkickstart
Version: 7.0
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Matt Wilson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-09-26 22:23 UTC by Need Real Name
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-10-03 03:18:31 UTC
Embargoed:


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

Description Need Real Name 2000-09-26 22:23:10 UTC
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 22:25:05 UTC
Created attachment 3571 [details]
patch to fix errors generated by creating temp files

Comment 2 Alan Cox 2000-10-01 22:40:10 UTC
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-05 02:49:08 UTC
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.