Bug#191588: lilo-installer should use the last console arg on the cmdline
On Thu, May 01, 2003 at 07:33:51PM -0400, Joe Nahmias wrote:
>
[ submitting a bugreport to BTS with patch ]
>
> --- debian/lilo-installer.postinst.orig 2003-02-22 11:54:18.000000000 -0500
> +++ debian/lilo-installer.postinst 2003-05-01 19:20:23.000000000 -0400
> @@ -41,12 +41,13 @@ fi
> bootdev=`mapdevfs $bootdev`
> rootfs=`mapdevfs $rootfs`
>
> -# serial support
> -
> -if grep -q console=ttyS /proc/cmdline; then
^
> - PORT=$(sed -e 's%.*console=ttyS%%' -e 's%,.*%%' /proc/cmdline)
^
> - SPEED=$(sed -e 's%.*console=ttyS[0-9]\+,%%' -e 's% .*%%' /proc/cmdline)
^
> +# Use a serial console if current default console is a serial port.
> +defconsole=$(sed -e 's/.*console=/console=/') # default console is last listed
> +if echo "${defconsole}" | grep -q console=ttyS; then
> + PORT=$(echo "${defconsole}" | sed -e 's%^console=ttyS%%' -e 's%,.*%%')
> + SPEED=$(echo "${defconsole}" | sed -e 's%^console=ttyS[0-9]\+,%%' -e 's% .*%%')
> SERIAL="${PORT},${SPEED}"
> + echo "Configuring lilo to use serial port ttyS${PORT} as the console."
> fi
>
> #write out lilo.conf
Not any sign of /proc/cmdline anymore, strange...
Geert Stappers
Reply to: