FreeBSD Bugzilla – Attachment 53264 Details for
Bug 80583
[MAINTAINER] shells/perlsh: change the way used to change /etc/shells
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
perlsh-1.8.patch
perlsh-1.8.patch (text/plain), 2.86 KB, created by
Renato Botelho
on 2005-05-03 17:20:01 UTC
(
hide
)
Description:
perlsh-1.8.patch
Filename:
MIME Type:
Creator:
Renato Botelho
Created:
2005-05-03 17:20:01 UTC
Size:
2.86 KB
patch
obsolete
>Index: Makefile >=================================================================== >RCS file: /home/ncvs/ports/shells/perlsh/Makefile,v >retrieving revision 1.19 >diff -u -r1.19 Makefile >--- Makefile 18 Apr 2005 16:08:18 -0000 1.19 >+++ Makefile 3 May 2005 16:11:43 -0000 >@@ -29,16 +29,7 @@ > Psh::Strategy.3 \ > Psh::StrategyBunch.3 > >-pre-install: >- @${PERL} -pi -e "s:/usr/local:${PREFIX}:g" ${WRKSRC}/Makefile; >- @${PERL} -pi -e "s:/usr/local/man/man1:${MAN3PREFIX}/man/man1:g" ${WRKSRC}/Makefile; >- @${PERL} -pi -e "s:/usr/local/lib/perl5/5.00503/man/man3:${MAN3PREFIX}/man/man3:g" ${WRKSRC}/Makefile; >- > post-install: >- @${ECHO_MSG} "Updating /etc/shells" >- @${CP} /etc/shells /etc/shells.bak >- @(${GREP} -v ${PREFIX}/bin/psh /etc/shells.bak; \ >- ${ECHO_CMD} ${PREFIX}/bin/psh) > /etc/shells >- @${RM} /etc/shells.bak >+ @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL > > .include <bsd.port.mk> >Index: pkg-deinstall >=================================================================== >RCS file: pkg-deinstall >diff -N pkg-deinstall >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ pkg-deinstall 3 May 2005 16:11:43 -0000 >@@ -0,0 +1,22 @@ >+#!/bin/sh >+# >+# $FreeBSD$ >+# >+ >+PSH="${PKG_PREFIX-/usr/local}/bin/psh" >+SHELLS="${PKG_DESTDIR-}/etc/shells" >+ >+case $2 in >+DEINSTALL) >+ if grep -qs "^$PSH\$" "$SHELLS"; then >+ if [ `id -u` -eq 0 ]; then >+ TMPSHELLS=`mktemp -t shells` >+ grep -v "^$PSH\$" "$SHELLS" > "$TMPSHELLS" >+ cat "$TMPSHELLS" > "$SHELLS" >+ rm "$TMPSHELLS" >+ else >+ echo "Not root, please remove $PSH from $SHELLS manually" >+ fi >+ fi >+ ;; >+esac >Index: pkg-install >=================================================================== >RCS file: pkg-install >diff -N pkg-install >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ pkg-install 3 May 2005 16:11:43 -0000 >@@ -0,0 +1,19 @@ >+#!/bin/sh >+# >+# $FreeBSD$ >+# >+ >+PSH="${PKG_PREFIX-/usr/local}/bin/psh" >+SHELLS="${PKG_DESTDIR-}/etc/shells" >+ >+case $2 in >+POST-INSTALL) >+ if [ -d "${SHELLS%/*}" ] && ! grep -qs "^$PSH\$" "$SHELLS"; then >+ if [ `id -u` -eq 0 ]; then >+ echo "$PSH" >> "$SHELLS" >+ else >+ echo "Not root, please add $PSH to $SHELLS manually" >+ fi >+ fi >+ ;; >+esac >Index: pkg-plist >=================================================================== >RCS file: /home/ncvs/ports/shells/perlsh/pkg-plist,v >retrieving revision 1.12 >diff -u -r1.12 pkg-plist >--- pkg-plist 19 Apr 2005 17:46:52 -0000 1.12 >+++ pkg-plist 3 May 2005 16:11:43 -0000 >@@ -1,7 +1,5 @@ > @comment $FreeBSD: ports/shells/perlsh/pkg-plist,v 1.12 2005/04/19 17:46:52 leeym Exp $ > bin/psh >-@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 > share/psh/complete/debian > share/psh/complete/perl > share/psh/complete/standard
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 80583
: 53264