1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-15 03:14:23 +00:00
freebsd-ports/net/isc-dhcp30-server/pkg-install
Sergey Matveychuk 40c2774e35 - Fix a bug in pkg-install script
Submitted by:	maintainer
2006-08-27 16:04:02 +00:00

32 lines
614 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
[ $# != 2 ] && exit 1
[ -z "${PKG_PREFIX}" ] && exit 1
[ -n "${BATCH}" ] && exit 0
case $2 in
POST-INSTALL)
if [ -x ${PKG_PREFIX}/etc/rc.d/isc-dhcpd ]; then
${PKG_PREFIX}/etc/rc.d/isc-dhcpd forceinstall
else
${PKG_PREFIX}/etc/rc.d/isc-dhcpd.sh forceinstall
fi
;;
DEINSTALL)
if [ -x ${PKG_PREFIX}/etc/rc.d/isc-dhcpd ]; then
${PKG_PREFIX}/etc/rc.d/isc-dhcpd forceuninstall
else
${PKG_PREFIX}/etc/rc.d/isc-dhcpd.sh forceuninstall
fi
;;
POST-DEINSTALL|PRE-INSTALL)
;;
*)
echo "usage: $0 <PKG_NAME> {PRE-INSTALL|POST-INSTALL|DEINSTALL|POST-DEINSTALL}" >&2
exit 1
;;
esac