summaryrefslogtreecommitdiff
path: root/shells/mksh/pkg-install
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--shells/mksh/pkg-install19
1 files changed, 19 insertions, 0 deletions
diff --git a/shells/mksh/pkg-install b/shells/mksh/pkg-install
new file mode 100644
index 000000000000..dea9b5231c91
--- /dev/null
+++ b/shells/mksh/pkg-install
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+MKSH="${PKG_PREFIX-/usr/local}/bin/mksh"
+SHELLS="${PKG_DESTDIR-}/etc/shells"
+
+case $2 in
+POST-INSTALL)
+ if [ -d "${SHELLS%/*}" ] && ! grep -qs "^$MKSH\$" "$SHELLS"; then
+ if [ `id -u` -eq 0 ]; then
+ echo "$MKSH" >> "$SHELLS"
+ else
+ echo "Not root, please add $MKSH to $SHELLS manually"
+ fi
+ fi
+ ;;
+esac