Commit 92214a94 authored by Mike Hibler's avatar Mike Hibler
Browse files

Deal with interchangable command line arguments in Linux agetty.

And wouldn't ya know it, they actually use both orders in different
versions of Ubuntu!
parent 96744876
......@@ -1138,11 +1138,14 @@ dolinux() {
getty="/mnt/etc/init/ttyS0"
if [ -e "$getty.conf" ]; then
cp -p $getty.conf $getty.conf.preemulab
sed -E -i '' -e "s/ttyS. [0-9]+/ttyS$u $s/" $getty.conf
# XXX wtf, apparently port/baud can be in either order
# helluva way to run a command line...
sed -E -i '' -e "s/ttyS. [0-9]+ /ttyS$u $s /" -e "s/[0-9]+ ttyS. /$s ttyS$u /" $getty.conf
elif [ -e "$getty.conf.preemulab" ]; then
# we previously moved it out of the way
cp -p $getty.conf.preemulab $getty.conf
sed -E -i '' -e "s/ttyS. [0-9]+/ttyS$u $s/" $getty.conf
# XXX see previous wtf
sed -E -i '' -e "s/ttyS. [0-9]+ /ttyS$u $s /" -e "s/[0-9]+ ttyS. /$s ttyS$u /" $getty.conf
fi
# or inittab
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment