From 0da3f8ba248d3f0002b79ae6f9098e61953d45c5 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 29 Mar 2007 15:34:01 +0200 Subject: [PATCH 1/1] config_console(): support setting of bps via bootoption serial --- autoconfig.functions | 15 +++++++++++++-- debian/changelog | 8 ++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/autoconfig.functions b/autoconfig.functions index e129cae..b130694 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -509,10 +509,21 @@ fi # activate serial console {{{ config_console(){ if checkbootparam "console"; then - einfo "Bootoption (for serial) console detected. Activating mgetty." + einfo "Bootoption (for serial) console detected." + eindent + if [ -r /etc/mgetty/mgetty.config ] ; then + MODE=$(getbootparam console | awk -F, '{print $2}') + MODE=${MODE%%n*} + [ -n "$MODE" ] || MODE=9600 # default mode + einfo "Setting speed in /etc/mgetty/mgetty.config to $MODE bps" + sed -i "s/speed [0-9]*/speed $MODE/" /etc/mgetty/mgetty.config ; eend $? + fi + + einfo "Activating mgetty." sed -i 's/^#T0/T0/' /etc/inittab sed -i 's/^#T1/T1/' /etc/inittab - /sbin/telinit q ; eend $? + /sbin/telinit q ; eend $? + eoutdent fi } # }}} diff --git a/debian/changelog b/debian/changelog index ffd84be..7864ced 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +grml-autoconfig (0.6.28) unstable; urgency=low + + * config_console(): support setting of bps via bootoption + serial as requested by Marc 'Zugschlus' Haber, see + http://blog.zugschlus.de/archives/530-using-grml-to-prepare-LVM-surgery.html + + -- Michael Prokop Thu, 29 Mar 2007 15:33:10 +0200 + grml-autoconfig (0.6.27) unstable; urgency=low * grml-autoconfig script: make sure CONFIG_FSTAB matches only -- 2.1.4