1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-11 02:50:24 +00:00
freebsd-ports/net/xorp/pkg-install
Bruce M Simpson 967ce18b9b Merge a number of fixes for the XORP port:
Expand %%PREFIX%% in the rc script.
 Create the group 'xorp' when the package is installed.
 Fix the snmpd configure check and MIB module installation.
 Fix the pkg-plist.

Note that as the XORP automake install target does not adhere to
hier(7), it may be desirable to specify PREFIX when building and/or
installing the port.

PR:		ports/103879
Submitted by:	Benjamin Black <ben@layer8.net>
2006-10-05 17:01:12 +00:00

38 lines
997 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
PATH=/bin:/usr/bin:/usr/sbin
if [ -z "${XORP_GROUP}" ]; then
XORP_GROUP=xorp
fi
case $2 in
POST-INSTALL)
if [ ! -f ${PREFIX}/etc/xorp.conf.sample ]; then \
cp ${WRKSRC}/rtrmgr/config.boot.sample ${PREFIX}/etc/xorp.conf.sample; \
fi
if pw group show "${XORP_GROUP}" 2>/dev/null; then \
echo "You already have a group \"${XORP_GROUP}\", so I will use it."; \
else \
echo "Adding group \"${XORP_GROUP}\"."; \
pw groupadd -n ${XORP_GROUP} 2>/dev/null; \
fi
echo ""
echo "Add the following lines to /etc/rc.conf to enable xorp:"
echo ""
echo "defaultrouter=\"NO\""
echo "xorp_enable=\"YES\""
echo ""
echo "A sample configuration has been installed at"
echo "${PREFIX}/etc/xorp.conf.sample. Copy it to ${PREFIX}/etc/xorp.conf"
echo "before editing. It MUST be edited before use."
echo ""
echo "Users who will be changing the xorp configuration via xorpsh"
echo "must be members of the group xorp."
echo ""
;;
esac