slackbuilds_ponce/libraries/libvirt/doinst.sh
Matteo Bernardini c7fd316e7d libraries/libvirt: Updated for version 0.10.1.
Also modified rc.libvirt; some refactoring and cleanups.

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
2012-09-05 20:10:53 -05:00

15 lines
389 B
Bash

#!/bin/sh
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
# toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
config etc/rc.d/rc.libvirt.new