|
Lines 1-29
Link Here
|
| 1 |
#!/bin/sh |
1 |
#!/bin/sh |
| 2 |
[ "x$1" = "x" ] && exit 1 |
2 |
[ "x$1" = "x" ] && exit 1 |
| 3 |
if [ "x$2" = "xPOST-INSTALL" ]; then |
3 |
if [ "x$2" = "xPOST-INSTALL" ]; then |
| 4 |
cat <<'EOF' >/boot.config |
4 |
echo "-P" > /boot.config |
| 5 |
-P |
5 |
sed -i '' "s|^console.*|console \"/usr/libexec/getty std.9600\" vt100 on secure|" /etc/ttys |
| 6 |
EOF |
|
|
| 7 |
mv -f /etc/ttys /etc/ttys.last |
| 8 |
awk -f - /etc/ttys.last <<'EOF' >/etc/ttys |
| 9 |
/^console/ { |
| 10 |
print "console \"/usr/libexec/getty std.9600\" vt100 on secure" |
| 11 |
next |
| 12 |
} |
| 13 |
{ |
| 14 |
print |
| 15 |
} |
| 16 |
EOF |
| 17 |
fi |
| 18 |
if [ "x$2" = "xDEINSTALL" ]; then |
| 19 |
mv -f /etc/ttys /etc/ttys.last |
| 20 |
awk -f - /etc/ttys.last <<'EOF' >/etc/ttys |
| 21 |
/^console/ { |
| 22 |
print "console none unknown off secure" |
| 23 |
next |
| 24 |
} |
| 25 |
{ |
| 26 |
print |
| 27 |
} |
| 28 |
EOF |
| 29 |
fi |
6 |
fi |