ports/104312: [PATCH]: sysutils/comconsole: Fix files left behind
Frank J. Laszlo
laszlof at vonostingroup.com
Wed Oct 11 23:32:15 UTC 2006
>Number: 104312
>Category: ports
>Synopsis: [PATCH]: sysutils/comconsole: Fix files left behind
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Oct 11 23:30:11 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Frank J. Laszlo
>Release: FreeBSD 5.4-RELEASE-p18 i386
>Organization:
>Environment:
System: FreeBSD main.vonostingroup.com 5.4-RELEASE-p18 FreeBSD 5.4-RELEASE-p18 #1: Sat Sep 16 18:56:42 UTC 2006 laszlof at main.vonostingroup.com:/usr/obj/usr/src/sys/MAIN i386
>Description:
Fixed pkg-install and pkg-deinstall scripts to properly handle /boot.config and /etc/ttys.
>How-To-Repeat:
>Fix:
--- comconsole-0.1.diff begins here ---
diff -NrU3 comconsole.orig/Makefile comconsole/Makefile
--- comconsole.orig/Makefile Wed Oct 11 16:48:56 2006
+++ comconsole/Makefile Wed Oct 11 16:49:07 2006
@@ -14,10 +14,6 @@
MAINTAINER= ports at FreeBSD.org
COMMENT= Setup your PC to use serial port COM1 as its console device
-BROKEN= Modifies files in / and does not undo upon deinstall
-DEPRECATED= ${BROKEN}
-EXPIRATION_DATE=2006-12-01
-
NO_BUILD= yes
NO_WRKSUBDIR= yes
diff -NrU3 comconsole.orig/pkg-deinstall comconsole/pkg-deinstall
--- comconsole.orig/pkg-deinstall Wed Oct 11 16:48:56 2006
+++ comconsole/pkg-deinstall Wed Oct 11 17:19:09 2006
@@ -1,29 +1,6 @@
#!/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
+ sed -i '' "s|^console.*|console none unknown off secure|" /etc/ttys
+ rm -f /boot.config
fi
diff -NrU3 comconsole.orig/pkg-install comconsole/pkg-install
--- comconsole.orig/pkg-install Wed Oct 11 16:48:56 2006
+++ comconsole/pkg-install Wed Oct 11 17:19:16 2006
@@ -1,29 +1,6 @@
#!/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
+ echo "-P" > /boot.config
+ sed -i '' "s|^console.*|console \"/usr/libexec/getty std.9600\" vt100 on secure|" /etc/ttys
fi
--- comconsole-0.1.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list