Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 May 2005 11:30:58 GMT
From:      Hirohisa Yamaguchi <umq@ueo.co.jp>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/81257: shells/rssh does not add itself to /etc/shells
Message-ID:  <200505191130.j4JBUwtA037108@www.freebsd.org>
Resent-Message-ID: <200505191140.j4JBe56t003086@freefall.freebsd.org>

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

>Number:         81257
>Category:       ports
>Synopsis:       shells/rssh does not add itself to /etc/shells
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 19 11:40:05 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Hirohisa Yamaguchi
>Release:        5.4-STABLE
>Organization:
>Environment:
>Description:
ports shells/rssh does not automatically add itself to /etc/shells.
>How-To-Repeat:
install shells/rssh using ports.
view /etc/shells

>Fix:
apply patch following..

--- ports/shells/rssh/Makefile.orig  Thu May 19 17:41:02 2005
+++ ports/shells/rssh/Makefile       Thu May 19 19:29:01 2005
@@ -19,7 +19,6 @@ USE_REINPLACE=	yes
 
 MAN1=		rssh.1
 MAN5=		rssh.conf.5
-PLIST_FILES=	bin/rssh etc/rssh.conf.dist libexec/rssh_chroot_helper
 
 OPTIONS=	RSYNC "rsync support" off \
 		RDIST "rdist support" off
@@ -43,5 +42,12 @@ CONFIGURE_ARGS+=--with-rdist=${LOCALBASE
 post-patch:
 	${REINPLACE_CMD} -E -e 's,(\$$\(DESTDIR\)\$$\(sysconfdir\)/\$$\$$f),\1.dist,g' \
 		${WRKSRC}/Makefile.in
+
+post-install:
+	@${ECHO_MSG} "updating /etc/shells"
+	@${CP} /etc/shells /etc/shells.bak
+	@(${GREP} -v ${PREFIX}/bin/${PORTNAME} /etc/shells.bak; \
+	 ${ECHO_CMD} ${PREFIX}/bin/${PORTNAME}) > /etc/shells
+	@${RM} /etc/shells.bak
 
 .include <bsd.port.post.mk>
--- /dev/null   Thu May 19 19:22:00 2005
+++ ports/shells/rssh/pkg-plist      Thu May 19 19:29:11 2005
@@ -0,0 +1,6 @@
+@comment $FreeBSD:$
+bin/rssh
+@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
+@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
+etc/rssh.conf.dist
+libexec/rssh_chroot_helper

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505191130.j4JBUwtA037108>