Ignore:
Timestamp:
Jun 18, 2013 7:15:04 AM (10 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
1105519
Parents:
fdb75b8
Message:

Add bootManager=GRUB option to pc-sysinstall. Using this will require that
you ship grub-install && grub-mkconfig with your install image,
or just install the package during installation time.

File:
1 edited

Legend:

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

    r754b73a r9caf430  
    384384}; 
    385385 
     386# Script which stamps grub on the specified disks 
     387setup_grub()  
     388{ 
     389  # Mount devfs 
     390  rc_halt "mount -t devfs devfs ${FSMNT}/dev" 
     391 
     392  # Read through our list and stamp grub for each device 
     393  while read line 
     394  do 
     395    # Make sure we have a /dev in front of the disk name 
     396    echo $line | grep -q '/dev/' 
     397    if [ $? -eq 0 ] ; then 
     398      gDisk="$line" 
     399    else 
     400      gDisk="/dev/$line" 
     401    fi 
     402 
     403    # Stamp GRUB now 
     404    rc_halt "chroot ${FSMNT} grub-install --force $gDisk" 
     405  done < ${TMPDIR}/.grub-install 
     406 
     407  # Make sure we re-create the default grub.cfg 
     408  rc_halt "chroot ${FSMNT} grub-mkconfig -o /boot/grub/grub.cfg" 
     409 
     410  # Sleep and cleanup 
     411  sleep 5 
     412  rc_halt "umount ${FSMNT}/dev" 
     413}; 
    386414 
    387415run_final_cleanup() 
     
    411439  # Generate the fstab for the installed system 
    412440  setup_fstab 
    413 }; 
     441 
     442  # Check if we need to setup GRUB 
     443  if [ -e "${TMPDIR}/.grub-install" ] ; then setup_grub; fi 
     444 
     445}; 
Note: See TracChangeset for help on using the changeset viewer.