#! /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