Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Oct 2006 17:23:09 -0600
From:      "Frank J. Laszlo" <laszlof@vonostingroup.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/104312: [PATCH]: sysutils/comconsole: Fix files left behind
Message-ID:  <E1GXnPp-000AbZ-44@main.vonostingroup.com>
Resent-Message-ID: <200610112330.k9BNUCmV018337@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1GXnPp-000AbZ-44>