Changeset 1936dcf


Ignore:
Timestamp:
06/09/14 06:46:48 (4 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.2, releng/10.0.3
Children:
bb2a5d1
Parents:
005da37
Message:

Fix two bugs when doing ZFS restores via installer.

  1. Don't try to re-mount everything when doing a zpool import
  1. If the user deleted the initial ZFS dataset, use the next one
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-sysinstall/backend/functions-zfsrestore.sh

    r35000f6 r1936dcf  
    137137  rc_halt "cp /boot/zfs/zpool.cache ${TMPDIR}/zpool.cache" 
    138138  rc_halt "zpool export ${ZPOOLNAME}" 
    139   rc_halt "zpool import -R ${FSMNT} ${ZPOOLNAME}" 
     139  rc_halt "zpool import -N -R ${FSMNT} ${ZPOOLNAME}" 
    140140 
    141141  # Lets mount the default dataset 
    142   rc_halt "mount -t zfs ${ZPOOLNAME}/ROOT/default ${FSMNT}" 
     142  lastBE="`zfs list ${ZPOOLNAME}/ROOT/ | tail -n 1 | awk '{print $1}'`" 
     143  rc_halt "mount -t zfs ${lastBE} ${FSMNT}" 
    143144 
    144145  echo_log "Setting ZFS dataset properties.." 
Note: See TracChangeset for help on using the changeset viewer.