50-e2k-serial 327 Bytes
Newer Older
1 2 3
#!/bin/sh

CFG="/boot/boot.conf"
4 5 6 7
[ -s "$CFG" ] || {
	echo "50-e2k-serial: $CFG missing, exiting" >&2
	exit 0
}
8 9 10 11 12

[ -n "$GLOBAL_TTY_DEV" -a -n "$GLOBAL_TTY_RATE" ] || exit 0

# tty0 first
sed -i "s/console=tty0 /console=$GLOBAL_TTY_DEV,$GLOBAL_TTY_RATE &/" "$CFG"
13 14

### NB: there's no boot.conf yet!  could only be the sample one