From 6bcbf9f38260f529b65261f04b6cdf3ca74e2b55 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Tue, 11 May 2010 22:55:05 +0200 Subject: network/wvdial: Added to 12.1 repository --- network/wvdial/doinst.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 network/wvdial/doinst.sh (limited to 'network/wvdial/doinst.sh') diff --git a/network/wvdial/doinst.sh b/network/wvdial/doinst.sh new file mode 100644 index 000000000000..2a50656fa994 --- /dev/null +++ b/network/wvdial/doinst.sh @@ -0,0 +1,17 @@ +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/wvdial.conf.new +config etc/ppp/peers/wvdial-pipe.new +config etc/ppp/peers/wvdial.new + -- cgit v1.2.3