diff options
author | tron <tron> | 2001-09-23 21:01:29 +0000 |
---|---|---|
committer | tron <tron> | 2001-09-23 21:01:29 +0000 |
commit | e0d9a2d22130bce0b456457d118cbad3f1d72c09 (patch) | |
tree | b29b85408effe8dd04117842014bb17fb45b00b8 /shells/tcsh | |
parent | e5730d3493abf7d1313ab7f10a4bcd0717985ead (diff) | |
download | pkgsrc-e0d9a2d22130bce0b456457d118cbad3f1d72c09.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 |