summaryrefslogtreecommitdiff
path: root/mk/install
diff options
context:
space:
mode:
authorjlam <jlam>2002-09-19 10:20:50 +0000
committerjlam <jlam>2002-09-19 10:20:50 +0000
commit99e714a7fd2aa74bee09eb79fd63cc5d183b7a81 (patch)
tree1bffb7e44941a43dbc7920874e34fb0904faac38 /mk/install
parentd1a32f9d3becd23c08ad93d8cddbfd1ba1ce672c (diff)
downloadpkgsrc-99e714a7fd2aa74bee09eb79fd63cc5d183b7a81.tar.gz
Restore the ability to not automatically install the rc.d script into
/etc/rc.d. This is controlled by the new variable PKG_RCD_SCRIPTS which may be set in /etc/mk.conf or in the shell environment in which the INSTALL script is executed. PKG_RCD_SCRIPTS only takes effect if ${PKG_CONFIG} == "YES" and defaults to NO.
Diffstat (limited to 'mk/install')
-rw-r--r--mk/install/header11
-rw-r--r--mk/install/install8
2 files changed, 15 insertions, 4 deletions
diff --git a/mk/install/header b/mk/install/header
index 27f1b63490d..2988850292f 100644
--- a/mk/install/header
+++ b/mk/install/header
@@ -2,7 +2,7 @@
#
# start of header
#
-# $NetBSD: header,v 1.13 2002/08/22 08:21:32 jlam Exp $
+# $NetBSD: header,v 1.14 2002/09/19 10:20:51 jlam Exp $
PKGNAME=$1
STAGE=$2
@@ -84,4 +84,13 @@ case "${PKG_CONFIG:-@PKG_CONFIG@}" in
;;
esac
+case "${PKG_RCD_SCRIPTS:-@PKG_RCD_SCRIPTS@}" in
+[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
+ _PKG_RCD_SCRIPTS=YES
+ ;;
+[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0)
+ _PKG_RCD_SCRIPTS=NO
+ ;;
+esac
+
# end of header
diff --git a/mk/install/install b/mk/install/install
index d5432efb38e..a98cf1aaa16 100644
--- a/mk/install/install
+++ b/mk/install/install
@@ -1,6 +1,6 @@
# start of install
#
-# $NetBSD: install,v 1.12 2002/08/22 08:21:32 jlam Exp $
+# $NetBSD: install,v 1.13 2002/09/19 10:20:51 jlam Exp $
case ${STAGE} in
PRE-INSTALL)
@@ -181,7 +181,8 @@ EOF
if [ -n "${CONF_FILES}" -o \
-n "${CONF_FILES_PERMS}" -o \
-n "${SUPPORT_FILES}" -o \
- -n "${SUPPORT_FILES_PERMS}" -o \
+ -n "${SUPPORT_FILES_PERMS}" ] || \
+ [ "${_PKG_RCD_SCRIPTS}" = "YES" -a \
-n "${RCD_SCRIPTS}" ]; then
${CAT} << EOF
Installing configuration files for ${PKGNAME}:
@@ -299,7 +300,8 @@ EOF
samplefile="${RCD_SCRIPTS_EXAMPLEDIR}/${script}"
file="${RCD_SCRIPTS_DIR}/${script}"
- if [ "${_PKG_CONFIG}" = "NO" ]; then
+ if [ "${_PKG_CONFIG}" = "NO" -o \
+ "${_PKG_RCD_SCRIPTS}" = "NO" ]; then
if [ ${_print_line} -gt 0 ]; then
_print_line=0
${CAT} << EOF