summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/install/install-functions14
-rwxr-xr-xscripts/install/install-postinst-new10
2 files changed, 16 insertions, 8 deletions
diff --git a/scripts/install/install-functions b/scripts/install/install-functions
index 5e24a921..0cca8944 100755
--- a/scripts/install/install-functions
+++ b/scripts/install/install-functions
@@ -230,6 +230,20 @@ select_drive () {
echo
}
+
+# Add a console entry to the config file.
+# $1: Console device name (e.g. ttyS0)
+# $2: Path to config file
+#
+add_console_entry () {
+ console_dev=$1
+ config_file=$2
+ sed -i -e "/console {/a \ \
+ device $console_dev {\n\
+ speed 9600\n\
+ }" $config_file
+}
+
# $1: user name
# $2: encrypted password
# $3: config file
diff --git a/scripts/install/install-postinst-new b/scripts/install/install-postinst-new
index d2065220..d782a5bf 100755
--- a/scripts/install/install-postinst-new
+++ b/scripts/install/install-postinst-new
@@ -158,14 +158,8 @@ setup_xen_extras () {
echo "kernel $xen_grub_boot_path/vmlinuz root=/dev/$rootdev boot=live vyatta-union=$xen_grub_boot_path console=hvc0" >> $grubfile
echo "initrd $xen_grub_boot_path/initrd.img" >> $grubfile
- # Add /proc/xen entry to fstab
- echo "xenfs /proc/xen xenfs defaults 0 0" >> $INST_ROOT/etc/fstab
-
- # Comment out serial port entry and add Xen console entry to inittab.
- inittab=$INST_ROOT/etc/inittab
- sed -i -e 's/^T0/#T0/' $inittab
- echo "" >> $inittab
- echo "h0:12345:respawn:/sbin/getty 38400 hvc0" >> $inittab
+ # Add console port entry for the Xen PV console
+ add_console_entry hvc0 "${INST_ROOT}${VYATTA_CFG_DIR}/config.boot"
}
check_for_xen_extras () {