2920a32c71
VIEW-DEINSTALL to the INSTALL/DEINSTALL scripts don't cause errors.
63 lines
1.4 KiB
Text
63 lines
1.4 KiB
Text
#!/bin/sh
|
|
#
|
|
# $NetBSD: INSTALL,v 1.4 2003/08/30 20:22:59 jlam Exp $
|
|
|
|
PKGNAME=$1
|
|
STAGE=$2
|
|
|
|
case ${STAGE} in
|
|
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
|
|
;;
|
|
esac
|
|
exit 0
|