aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/pnp/files/pkg-install.in
diff options
context:
space:
mode:
Diffstat (limited to 'net-mgmt/pnp/files/pkg-install.in')
-rw-r--r--net-mgmt/pnp/files/pkg-install.in73
1 files changed, 0 insertions, 73 deletions
diff --git a/net-mgmt/pnp/files/pkg-install.in b/net-mgmt/pnp/files/pkg-install.in
deleted file mode 100644
index 5e1def932e80..000000000000
--- a/net-mgmt/pnp/files/pkg-install.in
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-SPOOL_DIRS=%%SPOOL_DIRS%%
-NAGIOSUSER=%%NAGIOSUSER%%
-NAGIOSGROUP=%%NAGIOSGROUP%%
-
-# Create directories with mode and ownership specified in SPOOL_DIRS
-# as strings separated by '%' of format DIR:OWNER:GROUP:MODE
-dirs () {
- IFS=%
- for i in $SPOOL_DIRS; do
- d="${i%%:*}"
- if ! [ -d "$d" ]; then
- go=`echo "$i" | cut -f 2-3 -d :`
- m="${i##*:}"
- mkdir -p "$d"
- chown "$go" "$d"
- chmod "$m" "$d"
- fi
- done
-}
-
-check_sanity () {
- if ! pw group show "$NAGIOSGROUP" 2>&1 > /dev/null; then
- echo "No group '$NAGIOSGROUP'. Create it and try again."
- exit 1
- fi
- if ! pw user show "$NAGIOSUSER" 2>&1 > /dev/null; then
- echo "No user '$NAGIOSUSER'. Create it and try again."
- exit 1
- fi
-}
-
-# I messed the proper way to create the configuration for PNP:
-# config_local.php should be used for overrides and config.php
-# will come modified at each upgrade.
-#
-# I was installing config.php as config.php-sample and hoping
-# that people will use it as the base for original config.php.
-#
-# So, if we now have config.php at the installtion phase, then
-# it means that config.php may be customized. We save it as
-# config.php.orig and informing the user about it.
-fixup_config_local () {
- if [ -e "%%ETCDIR%%"/config.php ]; then
- cp "%%ETCDIR%%"/config.php "%%ETCDIR%%"/config.php.orig
- cat << "EOF"
-======================================================================
-WARNING:
-
-You have config.php for PNP; this means that you are probably
-upgrading from an old port version, where config.php-sample was
-installed instead of config.php and it was meant that you will
-cope with config.php yourself.
-
-PNP's way to do the things is to let config.php be overwritten at each
-upgrade and local overrides to it should go to config_local.php.
-
-Your existing config.php was saved as config.php.orig, please, review
-your modifications and put them to config_local.php.
-======================================================================
-EOF
- fi
-}
-
-if [ "x$2" = "xPRE-INSTALL" ]; then
- check_sanity
- dirs
- fixup_config_local
-fi