From e0d9a2d22130bce0b456457d118cbad3f1d72c09 Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 23 Sep 2001 21:01:29 +0000 Subject: 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. --- shells/tcsh/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'shells/tcsh') 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 -- cgit v1.2.3