mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-04 01:48:54 +00:00
77e31f46a7
-- This package will setup your PC to use serial port COM1 as its console device. Note that this is a special package and you should pkg_add this on a newly installed system. This is intended to install from installer floppy disk on a system without its own display nor keyboard.
30 lines
481 B
Bash
30 lines
481 B
Bash
#!/bin/sh
|
|
[ "x$1" = "x" ] && exit 1
|
|
if [ "x$2" = "xPOST-INSTALL" ]; then
|
|
cat <<'EOF' >/boot.config
|
|
-P
|
|
EOF
|
|
mv -f /etc/ttys /etc/ttys.last
|
|
awk -f - /etc/ttys.last <<'EOF' >/etc/ttys
|
|
/^console/ {
|
|
print "console \"/usr/libexec/getty std.9600\" vt100 on secure"
|
|
next
|
|
}
|
|
{
|
|
print
|
|
}
|
|
EOF
|
|
fi
|
|
if [ "x$2" = "xDEINSTALL" ]; then
|
|
mv -f /etc/ttys /etc/ttys.last
|
|
awk -f - /etc/ttys.last <<'EOF' >/etc/ttys
|
|
/^console/ {
|
|
print "console none unknown off secure"
|
|
next
|
|
}
|
|
{
|
|
print
|
|
}
|
|
EOF
|
|
fi
|