diff options
author | tron <tron@pkgsrc.org> | 2001-09-23 21:01:29 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2001-09-23 21:01:29 +0000 |
commit | 0aa1f59f15041259691dd8dcf1c707223a33a062 (patch) | |
tree | b29b85408effe8dd04117842014bb17fb45b00b8 /shells/tcsh | |
parent | 9a3915e30211d1a47bfd270a2dd90d56d6467665 (diff) | |
download | pkgsrc-0aa1f59f15041259691dd8dcf1c707223a33a062.tar.gz |
Make modifications of "/etc/shells" robust so that they don't fail if
"/etc/shells" doesn't exist or is empty after removing entries for
cerntain shell. These problems show up e.g. under SunOS.
Diffstat (limited to 'shells/tcsh')
-rw-r--r-- | shells/tcsh/Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/shells/tcsh/Makefile b/shells/tcsh/Makefile index 702abc94d86..b432598f56e 100644 --- a/shells/tcsh/Makefile +++ b/shells/tcsh/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.30 2001/09/06 00:54:52 kim Exp $ +# $NetBSD: Makefile,v 1.31 2001/09/23 21:01:30 tron Exp $ # DISTNAME= tcsh-6.11 @@ -70,6 +70,7 @@ post-install: done; \ done @${ECHO} "updating /etc/shells"; \ + ${TOUCH} /etc/shells; \ ${CP} /etc/shells /etc/shells.bak; \ if [ "${PREFIX}" = / ];then \ TCSHPATH=/bin/tcsh; \ @@ -77,7 +78,8 @@ post-install: TCSHPATH=${PREFIX}/bin/tcsh; \ fi; \ ( \ - ${GREP} -v '^$${TCSHPATH}$$' /etc/shells.bak; \ + ${GREP} -v '^$${TCSHPATH}$$' /etc/shells.bak || \ + ${TRUE}; \ ${ECHO} $${TCSHPATH} \ ) >/etc/shells |