diff options
author | jlam <jlam> | 2001-11-19 23:33:52 +0000 |
---|---|---|
committer | jlam <jlam> | 2001-11-19 23:33:52 +0000 |
commit | b01be16f9f306adb0646afc98071eea82130c930 (patch) | |
tree | e42f8e2162abd97a8291104495c6e313ee75526c /mk/install | |
parent | 7ba61482201aa10fe33067477f779c7946f40cd0 (diff) | |
download | pkgsrc-b01be16f9f306adb0646afc98071eea82130c930.tar.gz |
For completeness, add a SUPPORT_FILES_PERMS that acts like CONF_FILES_PERMS
but the user isn't prompted to customize the files at post-install time.
Diffstat (limited to 'mk/install')
-rw-r--r-- | mk/install/deinstall | 8 | ||||
-rw-r--r-- | mk/install/header | 3 | ||||
-rw-r--r-- | mk/install/install | 32 |
3 files changed, 22 insertions, 21 deletions
diff --git a/mk/install/deinstall b/mk/install/deinstall index 41512fe9628..f881e1324aa 100644 --- a/mk/install/deinstall +++ b/mk/install/deinstall @@ -1,9 +1,9 @@ # start of deinstall # -# $NetBSD: deinstall,v 1.1 2001/11/19 16:18:44 jlam Exp $ +# $NetBSD: deinstall,v 1.2 2001/11/19 23:33:53 jlam Exp $ ALL_FILES="${CONF_FILES} ${SUPPORT_FILES} ${RCD_SCRIPTS}" -set -- ${CONF_FILES_PERMS} +set -- ${CONF_FILES_PERMS} ${SUPPORT_FILES_PERMS} while [ $# -gt 0 ] do samplefile="$1"; file="$2"; owner="$3"; group="$4"; mode="$5" @@ -46,7 +46,7 @@ DEINSTALL) shift; shift if [ "${file}" != "${samplefile}" -a \ - -f ${file} -a -f ${samplefile} ] + -e ${file} -a -e ${samplefile} ] then if ${CMP} -s ${file} ${samplefile} then @@ -64,7 +64,7 @@ POST-DEINSTALL) samplefile="$1"; file="$2" shift; shift - if [ -f ${file} ] + if [ -e ${file} ] then modified_files="${modified_files} ${file}" fi diff --git a/mk/install/header b/mk/install/header index 8e6278f2356..ac2275f6a83 100644 --- a/mk/install/header +++ b/mk/install/header @@ -2,7 +2,7 @@ # # start of header # -# $NetBSD: header,v 1.1 2001/11/19 16:18:44 jlam Exp $ +# $NetBSD: header,v 1.2 2001/11/19 23:33:53 jlam Exp $ PKGNAME=$1 STAGE=$2 @@ -41,6 +41,7 @@ PKG_GROUPID="@PKG_GROUPID@" CONF_FILES="@CONF_FILES@" CONF_FILES_PERMS="@CONF_FILES_PERMS@" SUPPORT_FILES="@SUPPORT_FILES@" +SUPPORT_FILES_PERMS="@SUPPORT_FILES_PERMS@" RCD_SCRIPTS="@RCD_SCRIPTS@" MAKE_DIRS="@MAKE_DIRS@" diff --git a/mk/install/install b/mk/install/install index 9344ee3915a..cac9be212b2 100644 --- a/mk/install/install +++ b/mk/install/install @@ -1,6 +1,6 @@ # start of install # -# $NetBSD: install,v 1.1 2001/11/19 16:18:44 jlam Exp $ +# $NetBSD: install,v 1.2 2001/11/19 23:33:53 jlam Exp $ case ${STAGE} in PRE-INSTALL) @@ -71,7 +71,7 @@ POST-INSTALL) done if [ -n "${CONF_FILES}" -o -n "${CONF_FILES_PERMS}" -o \ - -n "${SUPPORT_FILES}" ] + -n "${SUPPORT_FILES}" -o -n "${SUPPORT_FILES_PERMS}" ] then ${ECHO} "Installing configuration files:" fi @@ -81,7 +81,7 @@ POST-INSTALL) samplefile="$1"; file="$2" shift; shift - if [ -f ${file} ] + if [ -e ${file} ] then ${ECHO} " ${file} already exists" else @@ -90,36 +90,36 @@ POST-INSTALL) ${CHMOD} @CONF_FILES_MODE@ ${file} fi done - set -- ${CONF_FILES_PERMS} + set -- ${SUPPORT_FILES} while [ $# -gt 0 ] do - samplefile="$1"; file="$2"; owner="$3"; group="$4"; mode="$5" - shift; shift; shift; shift; shift + samplefile="$1"; file="$2" + shift; shift - if [ -f ${file} ] + if [ -e ${file} ] then ${ECHO} " ${file} already exists" else ${ECHO} " ${file}" ${CP} ${samplefile} ${file} - ${CHOWN} ${owner} ${file} - ${CHGRP} ${group} ${file} - ${CHMOD} ${mode} ${file} + ${CHMOD} @SUPPORT_FILES_MODE@ ${file} fi done - set -- ${SUPPORT_FILES} + set -- ${CONF_FILES_PERMS} ${SUPPORT_FILES_PERMS} while [ $# -gt 0 ] do - samplefile="$1"; file="$2" - shift; shift + samplefile="$1"; file="$2"; owner="$3"; group="$4"; mode="$5" + shift; shift; shift; shift; shift - if [ -f ${file} ] + if [ -e ${file} ] then ${ECHO} " ${file} already exists" else ${ECHO} " ${file}" ${CP} ${samplefile} ${file} - ${CHMOD} @SUPPORT_FILES_MODE@ ${file} + ${CHOWN} ${owner} ${file} + ${CHGRP} ${group} ${file} + ${CHMOD} ${mode} ${file} fi done set -- ${RCD_SCRIPTS} @@ -128,7 +128,7 @@ POST-INSTALL) samplefile="$1"; file="$2" shift; shift - if [ -f ${file} ] + if [ -e ${file} ] then ${ECHO} " ${file} already exists" else |