diff options
-rwxr-xr-x | scripts/install-system | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/scripts/install-system b/scripts/install-system index 4fa48054..80fdf33e 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -1233,6 +1233,37 @@ setup_xen_partition_images () { fi } +setup_xen_extras () { + echo "Setting up config files for Xen..." + # Set up /boot/grub/menu.lst for use by pygrub + echo "timeout 5" >> $rootfsdir/boot/grub/menu.lst + echo "" >> $rootfsdir/boot/grub/menu.lst + echo "title vyatta-virt" >> $rootfsdir/boot/grub/menu.lst + echo "root (hd0,0)" >> $rootfsdir/boot/grub/menu.lst + echo "kernel /boot/vmlinuz root=/dev/xvda1 ro console=hvc0" >> $rootfsdir/boot/grub/menu.lst + + # Add /proc/xen entry to fstab + echo "xenfs /proc/xen xenfs defaults 0 0" >> $rootfsdir/etc/fstab + + # Comment out serial port entry and add Xen console entry to inittab. + sed -i -e 's/T0/#T0/' $rootfsdir/etc/inittab + echo "" >> $rootfsdiretc/inittab + echo "h0:12345:respawn:/sbin/getty 38400 hvc0" >> $rootfsdir/etc/inittab +} + +check_for_xen_extras () { + manuf=`/usr/sbin/dmidecode -s system-manufacturer` + prod=`/usr/sbin/dmidecode -s system-product-name` + if [ "$manuf" = "Xen" -a "$prod" = "HVM domU" ]; then + echo "You are installing to a $manuf $prod virtual machine." + echo -n "Would you like to set up config files for Xen? [No]: " + response=$(get_response "No" "Yes No Y N") + if [ "$response" == "yes" ] || [ "$response" == "y" ]; then + setup_xen_extras + fi + fi +} + progress_indicator () { case "$1" in start) $vyatta_bindir/progress-indicator $SPID & @@ -1362,6 +1393,8 @@ setup_xen_partition_images # Install grub install_grub +check_for_xen_extras + if [ -z $UNION ]; then # Fix up PAM configuration for login so that invalid users are prompted # for password |