From 5e393451a02da9fdffca24010b390564a82a4b28 Mon Sep 17 00:00:00 2001 From: Moritz Wilhelmy Date: Mon, 27 Dec 2010 01:28:55 -0600 Subject: network/wvdial: Added (ppp dialer app) Signed-off-by: Robby Workman --- 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 0000000000..2a50656fa9 --- /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