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

svn at pcbsd.org svn at pcbsd.org
Tue Dec 8 12:10:47 PST 2009


Author: kris
Date: 2009-12-08 12:10:47 -0800 (Tue, 08 Dec 2009)
New Revision: 5481

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

Make sure we sync the disk / cache before and after creating labels



Modified: pcbsd/trunk/pc-sysinstall/backend/functions-newfs.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-newfs.sh	2009-12-08 18:04:52 UTC (rev 5480)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-newfs.sh	2009-12-08 20:10:47 UTC (rev 5481)
@@ -73,14 +73,18 @@
               sleep 2
               rc_halt "newfs /dev/${PART}${EXT}"
               sleep 2
+              rc_halt "sync"
               rc_halt "glabel label ${PARTLABEL} /dev/${PART}${EXT}"
+              rc_halt "sync"
               sleep 2
               ;;
        UFS+S) echo_log "NEWFS: /dev/${PART} - ${PARTFS}"
               sleep 2
               rc_halt "newfs -U /dev/${PART}${EXT}"
               sleep 2
+              rc_halt "sync"
               rc_halt "glabel label ${PARTLABEL} /dev/${PART}${EXT}"
+              rc_halt "sync"
               sleep 2
               ;;
        UFS+J) echo_log "NEWFS: /dev/${PART} - ${PARTFS}"
@@ -91,13 +95,17 @@
               sleep 2
               rc_halt "newfs -O 2 -J /dev/${PART}${EXT}.journal"
               sleep 2
+              rc_halt "sync"
               rc_halt "glabel label ${PARTLABEL} /dev/${PART}${EXT}.journal"
+              rc_halt "sync"
               sleep 2
               ;;
          ZFS) echo_log "NEWFS: /dev/${PART} - ${PARTFS}" 
               setup_zfs_filesystem "${PART}" "${PARTFS}" "${PARTMNT}" "${EXT}"
               ;;
-        SWAP) rc_halt "glabel label ${PARTLABEL} /dev/${PART}${EXT}" 
+        SWAP) rc_halt "sync"
+              rc_halt "glabel label ${PARTLABEL} /dev/${PART}${EXT}" 
+              rc_halt "sync"
               sleep 2
               ;;
            *) exit_err "ERROR: Got unknown file-system type $PARTFS" ;;



More information about the Commits mailing list