diff options
author | jlam <jlam> | 2000-07-26 19:03:18 +0000 |
---|---|---|
committer | jlam <jlam> | 2000-07-26 19:03:18 +0000 |
commit | 319d1739c44c333e941780c7ae85bacdef2e77a4 (patch) | |
tree | f80d62c181a96524aff026476544f156c3da43a3 /net/netatalk/pkg | |
parent | 76d7cb792810c7e5861b2e83a41447e9c68c0b8f (diff) | |
download | pkgsrc-319d1739c44c333e941780c7ae85bacdef2e77a4.tar.gz |
Change configuration file directory from ${PREFIX}/etc to /etc/netatalk.
Configuration files really are host-dependent, so putting them in ${PREFIX}
which is often shared across machines of the same architecture, doesn't make
sense. Add machinery to install default configuration files.
Closes pkg/9948.
Diffstat (limited to 'net/netatalk/pkg')
-rw-r--r-- | net/netatalk/pkg/DEINSTALL | 28 | ||||
-rw-r--r-- | net/netatalk/pkg/INSTALL | 69 |
2 files changed, 97 insertions, 0 deletions
diff --git a/net/netatalk/pkg/DEINSTALL b/net/netatalk/pkg/DEINSTALL new file mode 100644 index 00000000000..b1f68c0a993 --- /dev/null +++ b/net/netatalk/pkg/DEINSTALL @@ -0,0 +1,28 @@ +#!/bin/sh +# +# $NetBSD: DEINSTALL,v 1.1 2000/07/26 19:03:20 jlam Exp $ + +PKGNAME=$1 +STAGE=$2 + +case ${STAGE} in +DEINSTALL) + ;; +POST-DEINSTALL) + ETCDIR=/etc/netatalk + + cat << EOF +=========================================================================== +If you won't be using ${PKGNAME} any longer, you may want to +remove the netatalk configuration file directory: + + ${ETCDIR} +=========================================================================== +EOF + ;; +*) + echo "Unexpected argument: ${STAGE}" + exit 1 + ;; +esac +exit 0 diff --git a/net/netatalk/pkg/INSTALL b/net/netatalk/pkg/INSTALL new file mode 100644 index 00000000000..fda230ad90d --- /dev/null +++ b/net/netatalk/pkg/INSTALL @@ -0,0 +1,69 @@ +#!/bin/sh +# +# $NetBSD: INSTALL,v 1.1 2000/07/26 19:03:23 jlam Exp $ + +PKGNAME=$1 +STAGE=$2 + +case ${STAGE} in +PRE-INSTALL) + ;; +POST-INSTALL) + ETCDIR=/etc/netatalk + + mkdir -p ${ETCDIR} + + # The idea is to copy old config files over to the new location if + # they exist. Otherwise, copy the default config from the examples + # directory. + # + if [ -f ${PKG_PREFIX}/etc/atalkd.conf ] + then + for file in \ + AppleVolumes.default \ + AppleVolumes.system \ + atalkd.conf \ + papd.conf + do + if [ ! -f ${ETCDIR}/${file} -a -f ${PKG_PREFIX}/etc/${file}] + then + echo " ${ETCDIR}/${file}" + cp ${PKG_PREFIX}/etc/${file} ${ETCDIR}/${file} + chmod 644 ${ETCDIR}/${file} + fi + done + echo "done." + cat << EOF +=========================================================================== +Old configuration files were copied from ${PKG_PREFIX}/etc to +${ETCDIR}. You may want to remove the old files as they are no +longer necessary. +=========================================================================== +EOF + else + echo "Installing configuration files:" + for file in \ + AppleVolumes.default \ + AppleVolumes.system \ + atalkd.conf \ + papd.conf + do + if [ -f ${ETCDIR}/${file} ] + then + echo " ${ETCDIR}/${file} already exists" + else + echo " ${ETCDIR}/${file}" + cp ${PKG_PREFIX}/share/examples/netatalk/${file} \ + ${ETCDIR}/${file} + chmod 644 ${ETCDIR}/${file} + fi + done + echo "done." + fi + ;; +*) + echo "Unexpected argument: ${STAGE}" + exit 1 + ;; +esac +exit 0 |