From 6b53e00c3f25bee6babd8e11ff6e846ad3f2107d Mon Sep 17 00:00:00 2001 From: James Meyer Date: Tue, 8 Sep 2009 15:19:07 -0500 Subject: etcnet: remove options file from pkg. post-install: on upgrade and backup options file exisits recreate the network interface. closes FS#482 --- abs/core-testing/etcnet/PKGBUILD | 6 +++--- abs/core-testing/etcnet/etcnet.install | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/abs/core-testing/etcnet/PKGBUILD b/abs/core-testing/etcnet/PKGBUILD index 3940da3..e9ac4f4 100755 --- a/abs/core-testing/etcnet/PKGBUILD +++ b/abs/core-testing/etcnet/PKGBUILD @@ -1,13 +1,13 @@ pkgname=etcnet pkgver=0.9.8 -pkgrel=7 +pkgrel=13 pkgdesc="/etc/net network configuration subsystem" url="http://etcnet.org/" depends=('bash' 'grep' 'sed' 'iproute2' 'wireless_tools' 'iptables' 'dhcpcd') arch=i686 install=etcnet.install source=(http://etcnet.org/files/$pkgname-$pkgver.tar.gz 10-defaults network functions.patch options ipv4route ipv4address ) -backup=(etc/net/ifaces/eth0/options etc/net/ifaces/eth0/ipv4route etc/net/ifaces/eth0/ipv4address) +#backup=(etc/net/ifaces/eth0/options etc/net/ifaces/eth0/ipv4route etc/net/ifaces/eth0/ipv4address) build() { cd $startdir/src/$pkgname-$pkgver @@ -23,7 +23,7 @@ build() { #setup default for eth0 mkdir -p $startdir/pkg/etc/net/ifaces/eth0 - cp $startdir/src/options $startdir/pkg/etc/net/ifaces/eth0/options +# cp $startdir/src/options $startdir/pkg/etc/net/ifaces/eth0/options # cp $startdir/src/ipv4route $startdir/pkg/etc/net/ifaces/eth0/ipv4route # cp $startdir/src/ipv4address $startdir/pkg/etc/net/ifaces/eth0/ipv4address diff --git a/abs/core-testing/etcnet/etcnet.install b/abs/core-testing/etcnet/etcnet.install index a8b8b17..f34629f 100755 --- a/abs/core-testing/etcnet/etcnet.install +++ b/abs/core-testing/etcnet/etcnet.install @@ -30,7 +30,11 @@ pre_upgrade() { # arg 1: the new package version # arg 2: the old package version post_upgrade() { - /bin/true + if [ -f /etc/net/ifaces/eth0/options.pacsave ] + then + systemconfig.py -m network + mv /etc/net/ifaces/eth0/options.pacsave /etc/net/ifaces/eth0/options.pacsave.orig + fi } # arg 1: the old package version -- cgit v0.12