blob: 305df6e231c4af75acbce4c65b041c8d641de72a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
#!/bin/sh
#
# $NetBSD: INSTALL,v 1.1 2001/10/31 22:56:34 zuntum 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
|