slackbuilds_ponce/network/miredo/doinst.sh
Fridrich von Stauffenberg 6234fdb9cd network/miredo: Added (teredo IPv6 tunneling)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
2011-11-26 09:09:11 -06:00

24 lines
479 B
Bash

config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
rm $NEW
fi
}
preserve_perms() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
if [ -e $OLD ]; then
cp -a $OLD ${NEW}.incoming
cat $NEW > ${NEW}.incoming
mv ${NEW}.incoming $NEW
fi
config $NEW
}
preserve_perms etc/rc.d/rc.miredo.new
config etc/miredo/miredo.conf.new