blob: 46bb91b84f1d48c84df6618d78e7303053160d02 (
plain) (
blame)
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
|
#! /bin/sh
# ex:sw=4 sts=4
move_newsyslog_conf() {
oldfile=${PKG_PREFIX}/etc/newsyslog.conf.d/ntpa
newfile=${PKG_PREFIX}/etc/newsyslog.conf.d/ntpa.conf
samplefile=${PKG_PREFIX}/etc/ntpa/ntpa.newsyslog
if [ -f ${oldfile} ]; then
echo "Configuration file found in old location: ${oldfile}"
if cmp -s ${samplefile} ${newfile} > /dev/null; then
echo "Configuration file in new location has not been modified from the default: ${newfile}"
echo " => Moving old configuration file to new location"
mv -f ${oldfile} ${newfile}
else
echo "Configuration file in new location has been modified from the default: ${newfile}"
echo " => Deleting old configuration file"
rm ${oldfile}
fi
fi
}
########################################################################
case $2 in
POST-INSTALL)
move_newsyslog_conf
;;
esac
|