+ MINIMUM_FREE_DATA=3072
+ MNT=
+ default_path=/boot/grub/default
+ grub_verify_tmp=/tmp/grub.verify.tmp
+ tmp_prefix=SAFE.18436
+ ret=1
+ STAGE_FILE_CORRUPTED=4
+ PREVENT_CORRUPTION=5
+ PARTITION_TABLE_MISMATCH=6
+ grub_stagefile_arch=i386
++ uname -m
+ '[' Xi686 = Xx86_64 ']'
+ DEFAULT_STAGE1_FILE=/usr/lib/grub/i386-pc/stage1
+ DEFAULT_STAGE2_FILE=/usr/lib/grub/i386-pc/stage2
+ STAGE1_FILE=/boot/grub/stage1
+ STAGE2_FILE=/boot/grub/stage2
+ PREVIOUS_MBR_PARTITION_TABLE=/tmp/previous_mbr_table
+ CDROM_UPGRADE_PATH=/data/cdrom_upgrade
+ SUPPORTED_GRUB_BOOTING=2
+ GRUB_BOOTING_FILE=/usr/share/stonegate/grub_booting_method
+ LEGACY_GRUB_FILE=/data/boot/grub/legacy_grub_booting
+ GRUB_UPGRADE_DONE=/tmp/grub_install_U_done
+ RUN_AT_BOOT_FILE=/data/run-at-boot
+ RUN_AT_BOOT_GOING=/data/config/base/grub_boot_going
++ date
+ echo '/mnt/usr/share/stonegate/grub_install started at Tue Jul 24 15:53:09 EDT 2012. '
/mnt/usr/share/stonegate/grub_install started at Tue Jul 24 15:53:09 EDT 2012. 
+ '[' -f /mnt/etc/stonegate-version ']'
++ /usr/sbin/sg-version
++ cat /mnt/etc/stonegate-version
+ echo 'Upgrading from StoneGate SSL VPN version 1.5.3.1551 to 1.5.100.1563'
Upgrading from StoneGate SSL VPN version 1.5.3.1551 to 1.5.100.1563
+ echo ''

++ df -k /data
++ grep /data
++ sed '-es,  *, ,g'
++ cut -d ' ' -f 4
+ data_size=340268
+ '[' 340268 -le 3072 ']'
++ cat /etc/stonegate-version
++ cut -d . -f 1
+ current_version=1
++ cat /etc/stonegate-version
++ cut -d . -f 2
+ current_minor_version=5
++ cat /etc/stonegate-version
++ cut -d . -f 3
+ current_micro_version=3
++ grep FW /etc/productname
+ is_fw=
++ grep SSL-VPN /etc/productname
+ is_sslvpn=SSL-VPN
+ '[' -z '' -a '(' '!' -z SSL-VPN ')' ']'
+ '[' 1 -eq 1 -a '(' 5 -lt 4 -o '(' 5 -eq 4 -a 3 -lt 5 ')' ')' ']'
+ '[' '!' -f /data/cdrom_upgrade -a '!' -z '' -a '!' -f /data/config/base/grub_boot_going -a 1 -lt 5 -a '!' -f /data/boot/grub/grub_m -o '(' '!' -z '' -a -f /data/boot/grub/grub_m -a -f /data/boot/grub/legacy_grub_booting -a '!' -f /data/config/base/grub_boot_going -a 1 -lt 5 ')' ']'
+ test_only=
+ no_verify=
+ update_master_grub=
+ reinstall_grub=
+ getopts RCUtnm: opt
+ case $opt in
+ MNT=/mnt
+ getopts RCUtnm: opt
+ shift 2
+ '[' '!' -d /sys/block ']'
+ '[' -z /mnt ']'
+ echo 'mount point MNT=/mnt'
mount point MNT=/mnt
+ '[' -f /mnt//usr/share/stonegate/grub_booting_method ']'
+ . /mnt/usr/share/stonegate/sg_install_utils
++ PART_MASTER_GRUB=1
++ PART_A_GRUB=2
++ PART_B_GRUB=3
++ PART_A=5
++ PART_B=6
++ PART_SWAP=7
++ PART_DATA=8
++ PART_SPOOL=9
++ INVALID_DISCNUM=N/A
+ delete_temporaries
+ rm -f /boot/grub/stage1.tmp /boot/grub/stage2.tmp /boot/grub/default.tmp /tmp/grub.verify.tmp
+ '[' '!' -e /dev/.devfsd ']'
+ sync
++ grep /data /proc/mounts
+ dev='/dev/sda8 /data ext3 rw,relatime,errors=remount-ro,data=journal 0 0
/dev/sda9 /spool/chroot/administration-service/opt/portwise/administration-service/database ext3 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/sda8 /spool/chroot/administration-service/data/config/base ext3 rw,relatime,errors=remount-ro,data=journal 0 0
/dev/sda9 /spool/chroot/authentication-service/opt/portwise/authentication-service/database ext3 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/sda8 /spool/chroot/access-point/data/config/base ext3 rw,relatime,errors=remount-ro,data=journal 0 0
/dev/sda8 /spool/chroot/authentication-service/data/config/base ext3 rw,relatime,errors=remount-ro,data=journal 0 0
/dev/sda8 /spool/chroot/policy-service/data/config/base ext3 rw,relatime,errors=remount-ro,data=journal 0 0'
+ '[' -n '' ']'
+ modify_new_master_grub_menu
+ inactive_booting_version=0
+ '[' -f /tmp/grub_install_U_done ']'
+ '[' -z '' -a -z '' ']'
+ '[' '!' -f /mnt//usr/share/stonegate/grub_booting_method ']'
++ cat /mnt//usr/share/stonegate/grub_booting_method
+ inactive_booting_version=2
+ '[' '!' -f /data/boot/grub/grub_m -o 2 -ne 2 ']'
+ echo 'Modifying the master grub'
Modifying the master grub
+ rm -f /data/boot/grub/legacy_grub_booting
+ is_raid_installation
+ mount
+ grep /dev/md
+ return 1
+ '[' 1 -eq 0 ']'
+ grub_disc /dev/sda8
+ dev=/dev/sda8
++ echo /dev/sda8
++ cut -d / -f1-3
++ sed -e 's,[0-9]*$,,g'
+ md_base_name=/dev/sda
+ GRUB_DISC='(hd0)'
+ '[' /dev/sda = /dev/md ']'
++ dirname /dev/sda8
+ '[' /dev = /dev/md ']'
+ disc_=/dev/sda8
+ disc=
+ '[' -z '' ']'
++ devname_to_discnum /dev/sda8
++ dev=/dev/sda8
++ '[' -e /dev/sda8 ']'
++ get_major_minor /dev/sda8
+++ sed s/,//g
++++ ls -Ll /dev/sda8
+++ get_field 5 'brw-rw---- 1 root root 8, 8 Jul 24 11:08 /dev/sda8'
++++ echo brw-rw---- 1 root root 8, 8 Jul 24 11:08 /dev/sda8
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 8 Jul 24 11:08 /dev/sda8'
+++ echo brw-rw---- 1 root root 8, 8 Jul 24 11:08 /dev/sda8
+++ cut '-d ' -f5
++ major=8
++++ ls -Ll /dev/sda8
+++ get_field 6 'brw-rw---- 1 root root 8, 8 Jul 24 11:08 /dev/sda8'
++++ echo brw-rw---- 1 root root 8, 8 Jul 24 11:08 /dev/sda8
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 8 Jul 24 11:08 /dev/sda8'
+++ echo brw-rw---- 1 root root 8, 8 Jul 24 11:08 /dev/sda8
+++ cut '-d ' -f6
++ minor=8
++ major_ref=8
++ minor_ref=8
++ dpath=/dev/discs
++ for i in '$dpath/*'
++ for j in '$i/*'
++ get_major_minor /dev/discs/disc0/disc
+++ sed s/,//g
++++ ls -Ll /dev/discs/disc0/disc
+++ get_field 5 'brw-rw---- 1 root root 8, 0 Jul 24 11:08 /dev/discs/disc0/disc'
++++ echo brw-rw---- 1 root root 8, 0 Jul 24 11:08 /dev/discs/disc0/disc
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 0 Jul 24 11:08 /dev/discs/disc0/disc'
+++ echo brw-rw---- 1 root root 8, 0 Jul 24 11:08 /dev/discs/disc0/disc
+++ cut '-d ' -f5
++ major=8
++++ ls -Ll /dev/discs/disc0/disc
+++ get_field 6 'brw-rw---- 1 root root 8, 0 Jul 24 11:08 /dev/discs/disc0/disc'
++++ echo brw-rw---- 1 root root 8, 0 Jul 24 11:08 /dev/discs/disc0/disc
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 0 Jul 24 11:08 /dev/discs/disc0/disc'
+++ echo brw-rw---- 1 root root 8, 0 Jul 24 11:08 /dev/discs/disc0/disc
+++ cut '-d ' -f6
++ minor=0
++ '[' 8 = 8 -a 0 = 8 ']'
++ for j in '$i/*'
++ get_major_minor /dev/discs/disc0/part1
+++ sed s/,//g
++++ ls -Ll /dev/discs/disc0/part1
+++ get_field 5 'brw-rw---- 1 root root 8, 1 Jul 24 11:08 /dev/discs/disc0/part1'
++++ echo brw-rw---- 1 root root 8, 1 Jul 24 11:08 /dev/discs/disc0/part1
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 1 Jul 24 11:08 /dev/discs/disc0/part1'
+++ echo brw-rw---- 1 root root 8, 1 Jul 24 11:08 /dev/discs/disc0/part1
+++ cut '-d ' -f5
++ major=8
++++ ls -Ll /dev/discs/disc0/part1
+++ get_field 6 'brw-rw---- 1 root root 8, 1 Jul 24 11:08 /dev/discs/disc0/part1'
++++ echo brw-rw---- 1 root root 8, 1 Jul 24 11:08 /dev/discs/disc0/part1
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 1 Jul 24 11:08 /dev/discs/disc0/part1'
+++ echo brw-rw---- 1 root root 8, 1 Jul 24 11:08 /dev/discs/disc0/part1
+++ cut '-d ' -f6
++ minor=1
++ '[' 8 = 8 -a 1 = 8 ']'
++ for j in '$i/*'
++ get_major_minor /dev/discs/disc0/part2
+++ sed s/,//g
++++ ls -Ll /dev/discs/disc0/part2
+++ get_field 5 'brw-rw---- 1 root root 8, 2 Jul 24 11:08 /dev/discs/disc0/part2'
++++ echo brw-rw---- 1 root root 8, 2 Jul 24 11:08 /dev/discs/disc0/part2
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 2 Jul 24 11:08 /dev/discs/disc0/part2'
+++ echo brw-rw---- 1 root root 8, 2 Jul 24 11:08 /dev/discs/disc0/part2
+++ cut '-d ' -f5
++ major=8
++++ ls -Ll /dev/discs/disc0/part2
+++ get_field 6 'brw-rw---- 1 root root 8, 2 Jul 24 11:08 /dev/discs/disc0/part2'
++++ echo brw-rw---- 1 root root 8, 2 Jul 24 11:08 /dev/discs/disc0/part2
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 2 Jul 24 11:08 /dev/discs/disc0/part2'
+++ echo brw-rw---- 1 root root 8, 2 Jul 24 11:08 /dev/discs/disc0/part2
+++ cut '-d ' -f6
++ minor=2
++ '[' 8 = 8 -a 2 = 8 ']'
++ for j in '$i/*'
++ get_major_minor /dev/discs/disc0/part3
+++ sed s/,//g
++++ ls -Ll /dev/discs/disc0/part3
+++ get_field 5 'brw-rw---- 1 root root 8, 3 Jul 24 11:08 /dev/discs/disc0/part3'
++++ echo brw-rw---- 1 root root 8, 3 Jul 24 11:08 /dev/discs/disc0/part3
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 3 Jul 24 11:08 /dev/discs/disc0/part3'
+++ echo brw-rw---- 1 root root 8, 3 Jul 24 11:08 /dev/discs/disc0/part3
+++ cut '-d ' -f5
++ major=8
++++ ls -Ll /dev/discs/disc0/part3
+++ get_field 6 'brw-rw---- 1 root root 8, 3 Jul 24 11:08 /dev/discs/disc0/part3'
++++ echo brw-rw---- 1 root root 8, 3 Jul 24 11:08 /dev/discs/disc0/part3
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 3 Jul 24 11:08 /dev/discs/disc0/part3'
+++ echo brw-rw---- 1 root root 8, 3 Jul 24 11:08 /dev/discs/disc0/part3
+++ cut '-d ' -f6
++ minor=3
++ '[' 8 = 8 -a 3 = 8 ']'
++ for j in '$i/*'
++ get_major_minor /dev/discs/disc0/part4
+++ sed s/,//g
++++ ls -Ll /dev/discs/disc0/part4
+++ get_field 5 'brw-rw---- 1 root root 8, 4 Jul 24 11:08 /dev/discs/disc0/part4'
++++ echo brw-rw---- 1 root root 8, 4 Jul 24 11:08 /dev/discs/disc0/part4
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 4 Jul 24 11:08 /dev/discs/disc0/part4'
+++ echo brw-rw---- 1 root root 8, 4 Jul 24 11:08 /dev/discs/disc0/part4
+++ cut '-d ' -f5
++ major=8
++++ ls -Ll /dev/discs/disc0/part4
+++ get_field 6 'brw-rw---- 1 root root 8, 4 Jul 24 11:08 /dev/discs/disc0/part4'
++++ echo brw-rw---- 1 root root 8, 4 Jul 24 11:08 /dev/discs/disc0/part4
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 4 Jul 24 11:08 /dev/discs/disc0/part4'
+++ echo brw-rw---- 1 root root 8, 4 Jul 24 11:08 /dev/discs/disc0/part4
+++ cut '-d ' -f6
++ minor=4
++ '[' 8 = 8 -a 4 = 8 ']'
++ for j in '$i/*'
++ get_major_minor /dev/discs/disc0/part5
+++ sed s/,//g
++++ ls -Ll /dev/discs/disc0/part5
+++ get_field 5 'brw-rw---- 1 root root 8, 5 Jul 24 11:08 /dev/discs/disc0/part5'
++++ echo brw-rw---- 1 root root 8, 5 Jul 24 11:08 /dev/discs/disc0/part5
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 5 Jul 24 11:08 /dev/discs/disc0/part5'
+++ echo brw-rw---- 1 root root 8, 5 Jul 24 11:08 /dev/discs/disc0/part5
+++ cut '-d ' -f5
++ major=8
++++ ls -Ll /dev/discs/disc0/part5
+++ get_field 6 'brw-rw---- 1 root root 8, 5 Jul 24 11:08 /dev/discs/disc0/part5'
++++ echo brw-rw---- 1 root root 8, 5 Jul 24 11:08 /dev/discs/disc0/part5
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 5 Jul 24 11:08 /dev/discs/disc0/part5'
+++ echo brw-rw---- 1 root root 8, 5 Jul 24 11:08 /dev/discs/disc0/part5
+++ cut '-d ' -f6
++ minor=5
++ '[' 8 = 8 -a 5 = 8 ']'
++ for j in '$i/*'
++ get_major_minor /dev/discs/disc0/part6
+++ sed s/,//g
++++ ls -Ll /dev/discs/disc0/part6
+++ get_field 5 'brw-rw---- 1 root root 8, 6 Jul 24 11:08 /dev/discs/disc0/part6'
++++ echo brw-rw---- 1 root root 8, 6 Jul 24 11:08 /dev/discs/disc0/part6
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 6 Jul 24 11:08 /dev/discs/disc0/part6'
+++ echo brw-rw---- 1 root root 8, 6 Jul 24 11:08 /dev/discs/disc0/part6
+++ cut '-d ' -f5
++ major=8
++++ ls -Ll /dev/discs/disc0/part6
+++ get_field 6 'brw-rw---- 1 root root 8, 6 Jul 24 11:08 /dev/discs/disc0/part6'
++++ echo brw-rw---- 1 root root 8, 6 Jul 24 11:08 /dev/discs/disc0/part6
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 6 Jul 24 11:08 /dev/discs/disc0/part6'
+++ echo brw-rw---- 1 root root 8, 6 Jul 24 11:08 /dev/discs/disc0/part6
+++ cut '-d ' -f6
++ minor=6
++ '[' 8 = 8 -a 6 = 8 ']'
++ for j in '$i/*'
++ get_major_minor /dev/discs/disc0/part7
+++ sed s/,//g
++++ ls -Ll /dev/discs/disc0/part7
+++ get_field 5 'brw-rw---- 1 root root 8, 7 Jul 24 11:08 /dev/discs/disc0/part7'
++++ echo brw-rw---- 1 root root 8, 7 Jul 24 11:08 /dev/discs/disc0/part7
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 7 Jul 24 11:08 /dev/discs/disc0/part7'
+++ echo brw-rw---- 1 root root 8, 7 Jul 24 11:08 /dev/discs/disc0/part7
+++ cut '-d ' -f5
++ major=8
++++ ls -Ll /dev/discs/disc0/part7
+++ get_field 6 'brw-rw---- 1 root root 8, 7 Jul 24 11:08 /dev/discs/disc0/part7'
++++ echo brw-rw---- 1 root root 8, 7 Jul 24 11:08 /dev/discs/disc0/part7
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 7 Jul 24 11:08 /dev/discs/disc0/part7'
+++ echo brw-rw---- 1 root root 8, 7 Jul 24 11:08 /dev/discs/disc0/part7
+++ cut '-d ' -f6
++ minor=7
++ '[' 8 = 8 -a 7 = 8 ']'
++ for j in '$i/*'
++ get_major_minor /dev/discs/disc0/part8
+++ sed s/,//g
++++ ls -Ll /dev/discs/disc0/part8
+++ get_field 5 'brw-rw---- 1 root root 8, 8 Jul 24 11:08 /dev/discs/disc0/part8'
++++ echo brw-rw---- 1 root root 8, 8 Jul 24 11:08 /dev/discs/disc0/part8
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 8 Jul 24 11:08 /dev/discs/disc0/part8'
+++ echo brw-rw---- 1 root root 8, 8 Jul 24 11:08 /dev/discs/disc0/part8
+++ cut '-d ' -f5
++ major=8
++++ ls -Ll /dev/discs/disc0/part8
+++ get_field 6 'brw-rw---- 1 root root 8, 8 Jul 24 11:08 /dev/discs/disc0/part8'
++++ echo brw-rw---- 1 root root 8, 8 Jul 24 11:08 /dev/discs/disc0/part8
++++ sed -r 's/ +/ /g; s/^ //; s/ $//'
+++ src='brw-rw---- 1 root root 8, 8 Jul 24 11:08 /dev/discs/disc0/part8'
+++ echo brw-rw---- 1 root root 8, 8 Jul 24 11:08 /dev/discs/disc0/part8
+++ cut '-d ' -f6
++ minor=8
++ '[' 8 = 8 -a 8 = 8 ']'
++ echo 0
++ return
+ disc=0
+ '[' 0 = N/A ']'
+ GRUB_DEV0=/dev/discs/disc0/disc
+ '[' -z '' ']'
+ '[' 0 -eq 1 -a -e /dev/discs/disc0/disc ']'
+ return 0
+ '[' 0 -eq 1 ']'
+ mkdir -p /data/master_grub
++ cat /data/boot/grub/grub_m_mount
+ file_check_grub_partion /dev/discs/disc0/part1
+ e2fsck -y /dev/discs/disc0/part1
++ cat /data/boot/grub/grub_m_mount
+ mount /dev/discs/disc0/part1 /data/master_grub
+ inactive_side=B
+ default=0
++ cat /etc/stonegate-version
+ a_version=1.5.3.1551
++ get_active_side
++ '[' -f /data/cdrom_upgrade ']'
+++ cat /proc/cmdline
+++ grep SGSIDE=B
++ '[' '!' -z '' ']'
++ active=A
++ echo A
+ '[' A = B ']'
+ active_side=A
+ inactive_side=B
+ default=0
++ cat /etc/stonegate-version
+ a_version=1.5.3.1551
+ '[' -f /mnt/etc/stonegate-version ']'
++ cat /mnt/etc/stonegate-version
+ b_version='1.5.100.1563 [NEW]'
+ save_default_a=savedefault
+ save_default_b='savedefault 0'
+ default=1
+ cat /mnt//usr/share/stonegate/grub_booting_method
+ echo 1.5.3.1551
+ '[' -f /mnt/etc/stonegate-version ']'
+ install_new_b_side_grub
+ force_install=
++ cat /data/boot/grub/grub_b
+ b_grub_part='(hd0,2)'
++ cat /data/boot/grub/grub_a
+ a_grub_part='(hd0,1)'
++ cat /data/boot/grub/partition_b
+ b_image_part='(hd0,5)'
++ cat /data/boot/grub/partition_a
+ a_image_part='(hd0,4)'
+ mkdir -p /data/grub_a_mount /data/grub_b_mount
++ cat /data/boot/grub/grub_a_mount
+ mount_grub_partition /dev/discs/disc0/part2 /data/grub_a_mount
+ mount_device=/dev/discs/disc0/part2
+ mount_point=/data/grub_a_mount
+ file_check_grub_partion /dev/discs/disc0/part2
+ e2fsck -y /dev/discs/disc0/part2
+ mount /dev/discs/disc0/part2 /data/grub_a_mount
++ cat /data/boot/grub/grub_b_mount
+ mount_grub_partition /dev/discs/disc0/part3 /data/grub_b_mount
+ mount_device=/dev/discs/disc0/part3
+ mount_point=/data/grub_b_mount
+ file_check_grub_partion /dev/discs/disc0/part3
+ e2fsck -y /dev/discs/disc0/part3
+ mount /dev/discs/disc0/part3 /data/grub_b_mount
+ '[' -n '' -o '!' -e /data/grub_b_mount/boot ']'
+ umount /data/grub_b_mount
+ umount /data/grub_a_mount
+ '[' -n '' -a -n '' ']'
+ run_grub_setup 'root (hd0,2)\nsetup (hd0,2)\nquit\n' 3
+ num=0
+ grub_cmds='root (hd0,2)\nsetup (hd0,2)\nquit\n'
+ shift
+ grub_install_part=3
+ shift
+ mkdir -p /data/tmp_grub
+ eval 'grubdev=$GRUB_DEV0'
++ grubdev=/dev/discs/disc0/disc
+ '[' -n /dev/discs/disc0/disc ']'
+ mount /dev/discs/disc0/part3 /data/tmp_grub
+ create_default_file /data/tmp_grub/boot/grub/default
+ '[' '!' -f /data/tmp_grub/boot/grub/default ']'
+ grub_command='device (hd0) /dev/discs/disc0/disc\nroot (hd0,2)\nsetup (hd0,2)\nquit\n'
++ echo -e device '(hd0)' '/dev/discs/disc0/disc\nroot' '(hd0,2)\nsetup' '(hd0,2)\nquit\n'
++ /mnt/sbin/grub --no-floppy --batch --config-file=/data/tmp_grub/boot/grub/menu.lst
+ out='Probing devices to guess BIOS drives. This may take a long time.


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

       [ Minimal BASH-like line editing is supported.   For
         the   first   word,  TAB  lists  possible  command
         completions.  Anywhere else TAB lists the possible
         completions of a device/filename. ]
grub> device (hd0) /dev/discs/disc0/disc
grub> root (hd0,2)
 Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0,2)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... no
 Running "install /boot/grub/stage1 (hd0,2) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
Done.
grub> quit'
+ echo Probing devices to guess BIOS drives. This may take a long time. GNU GRUB version 0.97 '(640K' lower / 3072K upper 'memory)' '[' Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ']' 'grub>' device '(hd0)' /dev/discs/disc0/disc 'grub>' root '(hd0,2)' Filesystem type is ext2fs, partition type 0x83 'grub>' setup '(hd0,2)' Checking if '"/boot/grub/stage1"' exists... yes Checking if '"/boot/grub/stage2"' exists... yes Checking if '"/boot/grub/e2fs_stage1_5"' exists... no Running '"install' /boot/grub/stage1 '(hd0,2)' /boot/grub/stage2 p /boot/grub/menu.lst '"...' succeeded Done. 'grub>' quit
Probing devices to guess BIOS drives. This may take a long time. GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ] grub> device (hd0) /dev/discs/disc0/disc grub> root (hd0,2) Filesystem type is ext2fs, partition type 0x83 grub> setup (hd0,2) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... no Running "install /boot/grub/stage1 (hd0,2) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded Done. grub> quit
+ num=1
+ umount /data/tmp_grub
+ eval 'grubdev=$GRUB_DEV1'
++ grubdev=
+ '[' -n '' ']'
++ date
+ echo Tue Jul 24 15:53:10 EDT 2012
+ '[' '' = yes -o '!' -f /usr/share/stonegate/grub_booting_method ']'
++ cat /etc/productname
+ product_name='Stonesoft SSL-VPN'
+ serial_config=
+ '[' -f /data/boot/grub/grub_m_serial ']'
++ cat /data/boot/grub/grub_m_serial
+ serial_config='serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1
terminal --timeout=4 console serial'
+ '[' '!' -f /mnt/etc/stonegate-version -a '!' -z '' ']'
++ cat /data/boot/grub/grub_a
+ echo 'timeout 5
default saved

serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1
terminal --timeout=4 console serial

title    Stonesoft SSL-VPN A: 1.5.3.1551
chainloader (hd0,1)+1
savedefault
'
+ '[' '!' -z '1.5.100.1563 [NEW]' ']'
++ cat /data/boot/grub/grub_b
+ echo '
title    Stonesoft SSL-VPN B: 1.5.100.1563 [NEW]
chainloader (hd0,2)+1
savedefault 0

'
+ umount /data/master_grub
+ '[' -n '' -a -n '' ']'
++ cat /data/boot/grub/grub_m
+ grub_m_root='(hd0,0)'
+ run_grub_setup 'savedefault --default=1\nquit\n' 1
+ num=0
+ grub_cmds='savedefault --default=1\nquit\n'
+ shift
+ grub_install_part=1
+ shift
+ mkdir -p /data/tmp_grub
+ eval 'grubdev=$GRUB_DEV0'
++ grubdev=/dev/discs/disc0/disc
+ '[' -n /dev/discs/disc0/disc ']'
+ mount /dev/discs/disc0/part1 /data/tmp_grub
+ create_default_file /data/tmp_grub/boot/grub/default
+ '[' '!' -f /data/tmp_grub/boot/grub/default ']'
+ grub_command='device (hd0) /dev/discs/disc0/disc\nsavedefault --default=1\nquit\n'
++ echo -e device '(hd0)' '/dev/discs/disc0/disc\nsavedefault' '--default=1\nquit\n'
++ /mnt/sbin/grub --no-floppy --batch --config-file=/data/tmp_grub/boot/grub/menu.lst
+ out='Probing devices to guess BIOS drives. This may take a long time.


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

       [ Minimal BASH-like line editing is supported.   For
         the   first   word,  TAB  lists  possible  command
         completions.  Anywhere else TAB lists the possible
         completions of a device/filename. ]
grub> device (hd0) /dev/discs/disc0/disc
grub> savedefault --default=1
grub> quit'
+ echo Probing devices to guess BIOS drives. This may take a long time. GNU GRUB version 0.97 '(640K' lower / 3072K upper 'memory)' '[' Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ']' 'grub>' device '(hd0)' /dev/discs/disc0/disc 'grub>' savedefault --default=1 'grub>' quit
Probing devices to guess BIOS drives. This may take a long time. GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ] grub> device (hd0) /dev/discs/disc0/disc grub> savedefault --default=1 grub> quit
+ num=1
+ umount /data/tmp_grub
+ eval 'grubdev=$GRUB_DEV1'
++ grubdev=
+ '[' -n '' ']'
+ '[' '!' -f /usr/share/stonegate/grub_booting_method ']'
+ exit 0
