diff options
author | Ted Trask <ttrask01@yahoo.com> | 2011-06-10 20:48:46 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2011-06-10 20:48:46 +0000 |
commit | 9cc634cf1091fdc8a056bbe0925145d56c6fca52 (patch) | |
tree | 353a39af4f42761b9918e93ad33a71b8c9421c68 | |
parent | 7513eadf420e19fde3451af1355c7874d1dfe27b (diff) | |
download | aports-9cc634cf1091fdc8a056bbe0925145d56c6fca52.tar.bz2 aports-9cc634cf1091fdc8a056bbe0925145d56c6fca52.tar.xz |
main/acf-provisioning: upgrade to 0.0.8
-rw-r--r-- | main/acf-provisioning/APKBUILD | 6 | ||||
-rw-r--r-- | main/acf-provisioning/acf-provisioning.post-upgrade | 21 |
2 files changed, 24 insertions, 3 deletions
diff --git a/main/acf-provisioning/APKBUILD b/main/acf-provisioning/APKBUILD index ca84ead0b4..3dd0136b88 100644 --- a/main/acf-provisioning/APKBUILD +++ b/main/acf-provisioning/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Ted Trask <ttrask01@yahoo.com> # Maintainer: Ted Trask <ttrask01@yahoo.com> pkgname=acf-provisioning -pkgver=0.0.7 -pkgrel=1 +pkgver=0.0.8 +pkgrel=0 pkgdesc="ACF for provisioning templated configs to devices" url="http://git.alpinelinux.org/cgit/acf-provisioning" arch="noarch" @@ -18,4 +18,4 @@ package() { make DESTDIR="$pkgdir" install } -md5sums="1fb5f927e1a0302101c813eacd997307 acf-provisioning-0.0.7.tar.bz2" +md5sums="9eaf2cda946429315020e0b69e54ba08 acf-provisioning-0.0.8.tar.bz2" diff --git a/main/acf-provisioning/acf-provisioning.post-upgrade b/main/acf-provisioning/acf-provisioning.post-upgrade index 035be21475..089c448acc 100644 --- a/main/acf-provisioning/acf-provisioning.post-upgrade +++ b/main/acf-provisioning/acf-provisioning.post-upgrade @@ -3,6 +3,27 @@ new=$1 old=$2 +# if current is not older than 0.0.8 we exit. +if ! [ "$(apk version -t $old 0.0.8)" = "<" ]; then + exit 0 +fi + +psql -U postgres -c "ALTER TABLE provisioning_params ADD COLUMN validate text" provisioning + +psql -U postgres -c "UPDATE provisioning_params SET descr='Phone dial pattern based on section 2.1.5 of RFC 3435, plus a comma to turn dialtone back on', regexp='^[*#0-9xT|,.%[%]-]*\$' WHERE name='digitmap'" provisioning +psql -U postgres -c "UPDATE provisioning_params SET descr='Timeout in seconds for each segment of digit map (separated by ''|'')', regexp='^[0-9|]*\$' WHERE name='digitmaptimeout'" provisioning + +psql -U postgres -c "UPDATE provisioning_params SET regexp='^%x%x%x%x%x%x%x%x%x%x%x%x\$', validate='local value, functions, params = ...\nvalue = string.upper(value)\nlocal others = functions.getselectresponse(\"SELECT count(*) FROM provisioning_values WHERE param_id=\\'\"..params.value.device.value.mac.param_id..\"\\' AND device_id!=\\'\"..params.value.device_id.value..\"\\' AND value=\\'\"..value..\"\\'\")\nif tonumber(others[1].count) > 0 then\n\treturn value, \"MAC Address must be unique\"\nend\nreturn value' WHERE name='mac'" provisioning + +psql -U postgres -c "INSERT INTO provisioning_params VALUES(default, 'callwaitingenable', 'boolean', 'Call Waiting Enable', '', 'true', '205', '', null)" provisioning +psql -U postgres -c "INSERT INTO provisioning_params VALUES(default, 'speeddialenable', 'boolean', 'Speed Dial Enable', '', 'true', '206', '', null)" provisioning +psql -U postgres -c "INSERT INTO param_groups_to_params VALUES((SELECT group_id FROM provisioning_groups WHERE label='Standard Phone'), (SELECT param_id FROM provisioning_params WHERE name='callwaitingenable'), 'true', false)" provisioning +psql -U postgres -c "INSERT INTO param_groups_to_params VALUES((SELECT group_id FROM provisioning_groups WHERE label='Standard Phone'), (SELECT param_id FROM provisioning_params WHERE name='speeddialenable'), 'true', false)" provisioning +psql -U postgres -c "INSERT INTO param_groups_to_params VALUES((SELECT group_id FROM provisioning_groups WHERE label='Public Phone'), (SELECT param_id FROM provisioning_params WHERE name='callwaitingenable'), 'true', false)" provisioning +psql -U postgres -c "INSERT INTO param_groups_to_params VALUES((SELECT group_id FROM provisioning_groups WHERE label='Public Phone'), (SELECT param_id FROM provisioning_params WHERE name='speeddialenable'), 'false', false)" provisioning +psql -U postgres -c "INSERT INTO param_groups_to_params VALUES((SELECT group_id FROM provisioning_groups WHERE label='Hotline'), (SELECT param_id FROM provisioning_params WHERE name='callwaitingenable'), 'true', false)" provisioning +psql -U postgres -c "INSERT INTO param_groups_to_params VALUES((SELECT group_id FROM provisioning_groups WHERE label='Hotline'), (SELECT param_id FROM provisioning_params WHERE name='speeddialenable'), 'false', false)" provisioning + # if current is not older than 0.0.7-r1 we exit. if ! [ "$(apk version -t $old 0.0.7-r1)" = "<" ]; then exit 0 |