From db5843ca6f02033ab0b2b7cf46ee8f6d5ced92fc Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 27 Jan 2010 14:24:30 +0000 Subject: main/acf-core: Added post-upgrade to use new acf.conf. --- main/acf-core/APKBUILD | 1 + main/acf-core/acf-core.post-upgrade | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 main/acf-core/acf-core.post-upgrade (limited to 'main/acf-core') diff --git a/main/acf-core/APKBUILD b/main/acf-core/APKBUILD index 6872173969..ea51c69809 100644 --- a/main/acf-core/APKBUILD +++ b/main/acf-core/APKBUILD @@ -5,6 +5,7 @@ pkgrel=0 pkgdesc="A web-based system administration interface framework" url="http://git.alpinelinux.org/cgit/acf-core" license="GPL-2" +install="$pkgname.post-upgrade" depends="acf-jquery acf-lib acf-skins haserl lua lua-posix lua-md5" source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2" diff --git a/main/acf-core/acf-core.post-upgrade b/main/acf-core/acf-core.post-upgrade new file mode 100644 index 0000000000..1a54c0451e --- /dev/null +++ b/main/acf-core/acf-core.post-upgrade @@ -0,0 +1,16 @@ +#!/bin/sh + +new=$1 +old=$2 + +# if current is not older than 0.10.1 we exit. +if ! [ "$(apk version -t $old 0.10.1)" = "<" ]; then + exit 0 +fi + +if [ -e /etc/acf/acf.conf.apk-new ]; then + mv /etc/acf/acf.conf /etc/acf/acf.conf.apk-old + mv /etc/acf/acf.conf.apk-new /etc/acf/acf.conf +fi + +exit 0 -- cgit v1.2.3