From 1328068b2a7f053155cb1ed338fdec0ba656babc Mon Sep 17 00:00:00 2001 From: hummypkg Date: Fri, 13 Jun 2014 19:09:47 +0000 Subject: [PATCH] automatic rule restore --- CONTROL/control | 2 +- CONTROL/postinst | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index 92d9c95..7ab49b8 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: sweeper Priority: optional Section: misc -Version: 2.0.1 +Version: 2.0.2 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: webif(>=1.0.14-10) diff --git a/CONTROL/postinst b/CONTROL/postinst index 3d1e7df..30e9bc2 100755 --- a/CONTROL/postinst +++ b/CONTROL/postinst @@ -1,7 +1,13 @@ #!/bin/sh f=/mod/etc/sweeper.conf -[ ! -f $f ] && [ -f $f~ ] && cp $f~ $f +if [ ! -f $f ]; then + if [ -f $f~ ]; then + cp $f~ $f + elif [ -f "$f-opkg.backup" ]; then + cp "$f-opkg.backup" $f + fi +fi exit 0