aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/acf-provisioning/APKBUILD4
-rw-r--r--main/acf-provisioning/acf-provisioning.post-upgrade47
2 files changed, 49 insertions, 2 deletions
diff --git a/main/acf-provisioning/APKBUILD b/main/acf-provisioning/APKBUILD
index 18b3af45f3..8932d44e19 100644
--- a/main/acf-provisioning/APKBUILD
+++ b/main/acf-provisioning/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Ted Trask <ttrask01@yahoo.com>
# Maintainer: Ted Trask <ttrask01@yahoo.com>
pkgname=acf-provisioning
-pkgver=0.1.1
+pkgver=0.1.2
pkgrel=0
pkgdesc="ACF for provisioning templated configs to devices"
url="http://git.alpinelinux.org/cgit/acf-provisioning"
@@ -18,4 +18,4 @@ package() {
make DESTDIR="$pkgdir" install
}
-md5sums="8532ca84d32af524e41b31a64a361490 acf-provisioning-0.1.1.tar.bz2"
+md5sums="becbc2c78447aa5da72d638863e8b975 acf-provisioning-0.1.2.tar.bz2"
diff --git a/main/acf-provisioning/acf-provisioning.post-upgrade b/main/acf-provisioning/acf-provisioning.post-upgrade
index f37be4ddce..1ed6aa56de 100644
--- a/main/acf-provisioning/acf-provisioning.post-upgrade
+++ b/main/acf-provisioning/acf-provisioning.post-upgrade
@@ -173,4 +173,51 @@ psql -U postgres -c "UPDATE provisioning_params SET value='UTC0' WHERE name='tim
fi
+# if current is older than 0.1.2 we update.
+if [ "$(apk version -t $old 0.1.2)" = "<" ]; then
+
+for a in $(seq 1 34); do
+ psql -U postgres -c "UPDATE provisioning_groups SET label='Registration $a (Polycom)' WHERE label='Registration $a'" provisioning
+done
+for a in $(seq 1 12); do
+ psql -U postgres -c "UPDATE provisioning_groups SET label='Registration $a (Snom)' WHERE label='Registration $a No Forwarding'" provisioning
+done
+psql -U postgres -c "UPDATE provisioning_groups SET label='Registration 1 (Unsupported)' WHERE label='Registration 1 Unsupported'" provisioning
+
+
+for a in $(seq 1 2); do
+ psql -U postgres -c "INSERT INTO provisioning_groups VALUES(default, 'reg$a', 'Registration $a (Linksys)', '10')" provisioning
+ psql -U postgres -c "UPDATE classes_to_param_groups SET group_id=(SELECT group_id FROM provisioning_groups WHERE label='Registration $a (Linksys)') WHERE class_id=(SELECT class_id FROM provisioning_classes WHERE label='Linksys Internet Phone Adapter PAP2T') AND group_id=(SELECT group_id FROM provisioning_groups WHERE label='Registration $a (Polycom)')" provisioning
+ psql -U postgres -c "INSERT INTO param_groups_to_params VALUES((SELECT group_id FROM provisioning_groups WHERE label='Registration $a (Linksys)'), (SELECT param_id FROM provisioning_params WHERE name='extension'), null, true)" provisioning
+ psql -U postgres -c "INSERT INTO param_groups_to_params VALUES((SELECT group_id FROM provisioning_groups WHERE label='Registration $a (Linksys)'), (SELECT param_id FROM provisioning_params WHERE name='password'), null, false)" provisioning
+ psql -U postgres -c "INSERT INTO param_groups_to_params VALUES((SELECT group_id FROM provisioning_groups WHERE label='Registration $a (Linksys)'), (SELECT param_id FROM provisioning_params WHERE name='forwardnoanswer'), null, true)" provisioning
+ psql -U postgres -c "INSERT INTO param_groups_to_params VALUES((SELECT group_id FROM provisioning_groups WHERE label='Registration $a (Linksys)'), (SELECT param_id FROM provisioning_params WHERE name='forwardnoanswerenable'), null, true)" provisioning
+ psql -U postgres -c "INSERT INTO param_groups_to_params VALUES((SELECT group_id FROM provisioning_groups WHERE label='Registration $a (Linksys)'), (SELECT param_id FROM provisioning_params WHERE name='forwardbusy'), null, true)" provisioning
+ psql -U postgres -c "INSERT INTO param_groups_to_params VALUES((SELECT group_id FROM provisioning_groups WHERE label='Registration $a (Linksys)'), (SELECT param_id FROM provisioning_params WHERE name='forwardbusyenable'), null, true)" provisioning
+ psql -U postgres -c "INSERT INTO param_groups_to_params VALUES((SELECT group_id FROM provisioning_groups WHERE label='Registration $a (Linksys)'), (SELECT param_id FROM provisioning_params WHERE name='forwardall'), null, true)" provisioning
+ psql -U postgres -c "INSERT INTO param_groups_to_params VALUES((SELECT group_id FROM provisioning_groups WHERE label='Registration $a (Linksys)'), (SELECT param_id FROM provisioning_params WHERE name='forwardallenable'), null, true)" provisioning
+ psql -U postgres -c "INSERT INTO param_groups_to_params VALUES((SELECT group_id FROM provisioning_groups WHERE label='Registration $a (Linksys)'), (SELECT param_id FROM provisioning_params WHERE name='callerid'), null, true)" provisioning
+done
+
+psql -U postgres -c "INSERT INTO provisioning_params VALUES(default, 'polycomringtone', 'select', 'Ring Tone (Polycom)', '', '2', '110', '', null)" provisioning
+psql -U postgres -c "INSERT INTO provisioning_options VALUES((SELECT param_id FROM provisioning_params WHERE name='polycomringtone'), 'Silent Ring', '1', '1')" provisioning
+psql -U postgres -c "INSERT INTO provisioning_options VALUES((SELECT param_id FROM provisioning_params WHERE name='polycomringtone'), 'Low Trill', '2', '2')" provisioning
+psql -U postgres -c "INSERT INTO provisioning_options VALUES((SELECT param_id FROM provisioning_params WHERE name='polycomringtone'), 'Low Double Trill', '3', '3')" provisioning
+psql -U postgres -c "INSERT INTO provisioning_options VALUES((SELECT param_id FROM provisioning_params WHERE name='polycomringtone'), 'Medium Trill', '4', '4')" provisioning
+psql -U postgres -c "INSERT INTO provisioning_options VALUES((SELECT param_id FROM provisioning_params WHERE name='polycomringtone'), 'Medium Double Trill', '5', '5')" provisioning
+psql -U postgres -c "INSERT INTO provisioning_options VALUES((SELECT param_id FROM provisioning_params WHERE name='polycomringtone'), 'High Trill', '6', '6')" provisioning
+psql -U postgres -c "INSERT INTO provisioning_options VALUES((SELECT param_id FROM provisioning_params WHERE name='polycomringtone'), 'High Double Trill', '7', '7')" provisioning
+psql -U postgres -c "INSERT INTO provisioning_options VALUES((SELECT param_id FROM provisioning_params WHERE name='polycomringtone'), 'Highest Trill', '8', '8')" provisioning
+psql -U postgres -c "INSERT INTO provisioning_options VALUES((SELECT param_id FROM provisioning_params WHERE name='polycomringtone'), 'Highest Double Trill', '9', '9')" provisioning
+psql -U postgres -c "INSERT INTO provisioning_options VALUES((SELECT param_id FROM provisioning_params WHERE name='polycomringtone'), 'Beeble', '10', '10')" provisioning
+psql -U postgres -c "INSERT INTO provisioning_options VALUES((SELECT param_id FROM provisioning_params WHERE name='polycomringtone'), 'Triplet', '11', '11')" provisioning
+psql -U postgres -c "INSERT INTO provisioning_options VALUES((SELECT param_id FROM provisioning_params WHERE name='polycomringtone'), 'Ringback-style', '12', '12')" provisioning
+psql -U postgres -c "INSERT INTO provisioning_options VALUES((SELECT param_id FROM provisioning_params WHERE name='polycomringtone'), 'Low Trill Precedence', '13', '13')" provisioning
+psql -U postgres -c "INSERT INTO provisioning_options VALUES((SELECT param_id FROM provisioning_params WHERE name='polycomringtone'), 'Ring Splash', '14', '14')" provisioning
+for a in $(seq 1 34); do
+ psql -U postgres -c "INSERT INTO param_groups_to_params VALUES((SELECT group_id FROM provisioning_groups WHERE label='Registration $a (Polycom)'), (SELECT param_id FROM provisioning_params WHERE name='polycomringtone'), null, true)" provisioning
+done
+
+fi
+
exit 0