summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authordsomero <xgizzmo@slackbuilds.org>2012-09-30 10:25:15 -0400
committerRobby Workman <rworkman@slackbuilds.org>2012-09-30 20:01:06 -0500
commit9760463c424c7b3b7b48d728a48b45dd218e67a5 (patch)
tree3ac92a3d146d920e97c22610ae5e353b843fb6d8 /network
parent128f76cf0624fea9da75c1d5fbc20fe14544c8b4 (diff)
downloadslackbuilds-9760463c424c7b3b7b48d728a48b45dd218e67a5.tar.gz
network/ebtables: Fixed (Don't clobber config file)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r--network/ebtables/doinst.sh15
-rw-r--r--network/ebtables/ebtables.SlackBuild5
2 files changed, 19 insertions, 1 deletions
diff --git a/network/ebtables/doinst.sh b/network/ebtables/doinst.sh
new file mode 100644
index 0000000000..092a869b6b
--- /dev/null
+++ b/network/ebtables/doinst.sh
@@ -0,0 +1,15 @@
+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/ethertypes.new
+
diff --git a/network/ebtables/ebtables.SlackBuild b/network/ebtables/ebtables.SlackBuild
index 39fa5ede9f..758a3521a5 100644
--- a/network/ebtables/ebtables.SlackBuild
+++ b/network/ebtables/ebtables.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=ebtables
VERSION=${VERSION:-2.0.10}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -91,6 +91,8 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+mv $PKG/etc/ethertypes $PKG/etc/ethertypes.new
+
# Remove Red Hat junk
rm -rf $PKG/etc/rc.d $PKG/etc/sysconfig
@@ -100,6 +102,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}