Changeset cce092d


Ignore:
Timestamp:
Jun 19, 2013 7:13:34 AM (13 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
506d427
Parents:
d4ca180
Message:

Move grub stamp to later in install, after we have a chance to run scripts.

Location:
src-sh/pc-sysinstall/backend
Files:
2 edited

Legend:

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

    rd4ca180 rcce092d  
    384384}; 
    385385 
    386 # Script which stamps grub on the specified disks 
    387 setup_grub()  
    388 { 
    389   # Mount devfs 
    390   rc_halt "mount -t devfs devfs ${FSMNT}/dev" 
    391  
    392   # Make sure to copy zpool.cache first 
    393   rc_halt "cp /boot/zfs/zpool.cache ${FSMNT}/boot/zfs/" 
    394  
    395   # Read through our list and stamp grub for each device 
    396   while read line 
    397   do 
    398     # Make sure we have a /dev in front of the disk name 
    399     echo $line | grep -q '/dev/' 
    400     if [ $? -eq 0 ] ; then 
    401       gDisk="$line" 
    402     else 
    403       gDisk="/dev/$line" 
    404     fi 
    405  
    406     # Stamp GRUB now 
    407     rc_halt "chroot ${FSMNT} grub-install --force $gDisk" 
    408   done < ${TMPDIR}/.grub-install 
    409  
    410   # Make sure we re-create the default grub.cfg 
    411   rc_halt "chroot ${FSMNT} grub-mkconfig -o /boot/grub/grub.cfg" 
    412  
    413   # Sleep and cleanup 
    414   sleep 5 
    415   rc_halt "umount ${FSMNT}/dev" 
    416 }; 
    417  
    418386run_final_cleanup() 
    419387{ 
     
    443411  setup_fstab 
    444412 
    445   # Check if we need to setup GRUB 
    446   if [ -e "${TMPDIR}/.grub-install" ] ; then setup_grub; fi 
    447  
    448 }; 
     413}; 
  • src-sh/pc-sysinstall/backend/functions-unmount.sh

    r754b73a5 rcce092d  
    6767  cd / 
    6868 
     69  # Check if we need to setup GRUB 
     70  if [ -e "${TMPDIR}/.grub-install" ] ; then setup_grub; fi 
     71 
    6972  # Start by unmounting any ZFS partitions 
    7073  zfs_cleanup_unmount 
     
    219222 
    220223}; 
     224 
     225# Script which stamps grub on the specified disks 
     226setup_grub()  
     227{ 
     228  # Mount devfs 
     229  rc_halt "mount -t devfs devfs ${FSMNT}/dev" 
     230 
     231  # Make sure to copy zpool.cache first 
     232  rc_nohalt "cp /boot/zfs/zpool.cache ${FSMNT}/boot/zfs/" 
     233 
     234  # Copy the hostid so that our zfs cache works 
     235  rc_nohalt "cp /etc/hostid ${FSMNT}/etc/hostid" 
     236 
     237  # Read through our list and stamp grub for each device 
     238  while read line 
     239  do 
     240    # Make sure we have a /dev in front of the disk name 
     241    echo $line | grep -q '/dev/' 
     242    if [ $? -eq 0 ] ; then 
     243      gDisk="$line" 
     244    else 
     245      gDisk="/dev/$line" 
     246    fi 
     247 
     248    # Stamp GRUB now 
     249    rc_halt "chroot ${FSMNT} grub-install --force $gDisk" 
     250  done < ${TMPDIR}/.grub-install 
     251 
     252  # Make sure we re-create the default grub.cfg 
     253  rc_halt "chroot ${FSMNT} grub-mkconfig -o /boot/grub/grub.cfg" 
     254 
     255  # Sleep and cleanup 
     256  sleep 5 
     257  rc_halt "umount ${FSMNT}/dev" 
     258}; 
Note: See TracChangeset for help on using the changeset viewer.