aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1999-12-31 10:10:55 +0800
committersteve <steve@FreeBSD.org>1999-12-31 10:10:55 +0800
commitf8c22ca6a991f19741bc0524ca0cdfe54a3db98d (patch)
treee4a5676b3e67b605fe47d543b5c196813a30eb31
parente83c9ad4ff936b1697ce12421560bfe212917cef (diff)
downloadfreebsd-ports-gnome-f8c22ca6a991f19741bc0524ca0cdfe54a3db98d.tar.gz
freebsd-ports-gnome-f8c22ca6a991f19741bc0524ca0cdfe54a3db98d.tar.zst
freebsd-ports-gnome-f8c22ca6a991f19741bc0524ca0cdfe54a3db98d.zip
Make sure we add ksh93 to /etc/shells.
PR: 15788 Submitted by: maintainer
-rw-r--r--shells/ksh93/Makefile7
-rw-r--r--shells/ksh93/pkg-plist2
2 files changed, 9 insertions, 0 deletions
diff --git a/shells/ksh93/Makefile b/shells/ksh93/Makefile
index a29bd30f8ad4..41179ac4991c 100644
--- a/shells/ksh93/Makefile
+++ b/shells/ksh93/Makefile
@@ -39,4 +39,11 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/bin/ksh ${PREFIX}/bin/ksh93
${INSTALL_MAN} ${WRKSRC}/man/man1/sh.1 ${PREFIX}/man/man1/ksh93.1
+post-install:
+ @${ECHO_MSG} "Updating /etc/shells"
+ @${CP} /etc/shells /etc/shells.bak
+ @(${GREP} -v ${PREFIX}/bin/ksh93 /etc/shells.bak; \
+ ${ECHO} ${PREFIX}/bin/ksh93) > /etc/shells
+ @${RM} /etc/shells.bak
+
.include <bsd.port.mk>
diff --git a/shells/ksh93/pkg-plist b/shells/ksh93/pkg-plist
index 86000160719b..07a5f96de8dc 100644
--- a/shells/ksh93/pkg-plist
+++ b/shells/ksh93/pkg-plist
@@ -1 +1,3 @@
bin/ksh93
+@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells
+@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells