[PC-BSD Commits] r6180 - pcbsd/trunk/pc-sysinstall/backend

svn at pcbsd.org svn at pcbsd.org
Thu Feb 4 11:46:53 PST 2010


Author: kris
Date: 2010-02-04 11:46:53 -0800 (Thu, 04 Feb 2010)
New Revision: 6180

Modified:
   pcbsd/trunk/pc-sysinstall/backend/functions-unmount.sh
   pcbsd/trunk/pc-sysinstall/backend/functions.sh
Log:

Fixed a variable clobbering bug in network installation, and make sure we unmount properly after a failure



Modified: pcbsd/trunk/pc-sysinstall/backend/functions-unmount.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-unmount.sh	2010-02-04 19:10:50 UTC (rev 6179)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-unmount.sh	2010-02-04 19:46:53 UTC (rev 6180)
@@ -137,21 +137,21 @@
        # Check if we've found "/" again, don't need to mount it twice
        if [ "$PARTMNT" != "/" -a "${PARTMNT}" != "none" -a "${PARTFS}" != "ZFS" ]
        then
-         rc_nohalt "umount ${FSMNT}${PARTMNT}"
+         rc_nohalt "umount -f ${FSMNT}${PARTMNT}"
        fi
      done
 
      # Last lets the /mnt partition
      #########################################################
-     rc_nohalt "umount ${FSMNT}"
+     rc_nohalt "umount -f ${FSMNT}"
 
     fi
    else
      # We are doing a upgrade, try unmounting any of these filesystems
      chroot ${FSMNT} /sbin/umount -a >>${LOGOUT} >>${LOGOUT}
-     umount ${FSMNT}/usr >>${LOGOUT} 2>>${LOGOUT}
-     umount ${FSMNT}/dev >>${LOGOUT} 2>>${LOGOUT}
-     umount ${FSMNT} >>${LOGOUT} 2>>${LOGOUT}
+     umount -f ${FSMNT}/usr >>${LOGOUT} 2>>${LOGOUT}
+     umount -f ${FSMNT}/dev >>${LOGOUT} 2>>${LOGOUT}
+     umount -f ${FSMNT} >>${LOGOUT} 2>>${LOGOUT}
      rc_nohalt "sh ${TMPDIR}/.upgrade-unmount"
    fi
    

Modified: pcbsd/trunk/pc-sysinstall/backend/functions.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions.sh	2010-02-04 19:10:50 UTC (rev 6179)
+++ pcbsd/trunk/pc-sysinstall/backend/functions.sh	2010-02-04 19:46:53 UTC (rev 6180)
@@ -163,30 +163,30 @@
 {
 
 FETCHFILE="$1"
-OUTFILE="$2"
+FETCHOUTFILE="$2"
 EXITFAILED="$3"
 
 SIZEFILE="${TMPDIR}/.fetchSize"
 EXITFILE="${TMPDIR}/.fetchExit"
 
 rm ${SIZEFILE} 2>/dev/null >/dev/null
-rm ${OUTFILE} 2>/dev/null >/dev/null
+rm ${FETCHOUTFILE} 2>/dev/null >/dev/null
 
 fetch -s "${FETCHFILE}" >${SIZEFILE}
 SIZE="`cat ${SIZEFILE}`"
 SIZE="`expr ${SIZE} / 1024`"
 echo "FETCH: ${FETCHFILE}"
-echo "FETCH: ${OUTFILE}" >>${LOGOUT}
+echo "FETCH: ${FETCHOUTFILE}" >>${LOGOUT}
 
-( fetch -o ${OUTFILE} "${FETCHFILE}" >/dev/null 2>/dev/null ; echo "$?" > ${EXITFILE} ) &
+( fetch -o ${FETCHOUTFILE} "${FETCHFILE}" >/dev/null 2>/dev/null ; echo "$?" > ${EXITFILE} ) &
 PID="$!"
 while
 z=1
 do
 
-  if [ -e "$OUTFILE" ]
+  if [ -e "${FETCHOUTFILE}" ]
   then
-    DSIZE=`du -k ${OUTFILE} | tr -d '\t' | cut -d '/' -f 1`
+    DSIZE=`du -k ${FETCHOUTFILE} | tr -d '\t' | cut -d '/' -f 1`
     echo "SIZE: ${SIZE} DOWNLOADED: ${DSIZE}"
     echo "SIZE: ${SIZE} DOWNLOADED: ${DSIZE}" >>${LOGOUT}
   fi



More information about the Commits mailing list