config_console(): support setting of bps via bootoption serial 0.6.28
authorMichael Prokop <mika@grml.org>
Thu, 29 Mar 2007 13:34:01 +0000 (15:34 +0200)
committerMichael Prokop <mika@grml.org>
Thu, 29 Mar 2007 13:34:01 +0000 (15:34 +0200)
autoconfig.functions
debian/changelog

index e129cae..b130694 100755 (executable)
@@ -509,10 +509,21 @@ fi
 # activate serial console {{{
 config_console(){
 if checkbootparam "console"; then
 # 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
     sed -i 's/^#T0/T0/' /etc/inittab
     sed -i 's/^#T1/T1/' /etc/inittab
-  /sbin/telinit q ; eend $?
+    /sbin/telinit q ; eend $?
+  eoutdent
 fi
 }
 # }}}
 fi
 }
 # }}}
index ffd84be..7864ced 100644 (file)
@@ -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 <mika@grml.org>  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
 grml-autoconfig (0.6.27) unstable; urgency=low
 
   * grml-autoconfig script: make sure CONFIG_FSTAB matches only