diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-01-13 20:26:17 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-01-13 20:26:17 +0000 |
commit | afb9ee563a85f159e8382a0b2925b48c3ccf7be3 (patch) | |
tree | fdd506d4ce252933c511a398831134ca4fc206cd /main/acf-provisioning/acf-provisioning.post-upgrade | |
parent | aaf7501518d7db71e8bdb626dfba002306cea940 (diff) | |
download | aports-afb9ee563a85f159e8382a0b2925b48c3ccf7be3.tar.bz2 aports-afb9ee563a85f159e8382a0b2925b48c3ccf7be3.tar.xz |
main/acf-provisioning: upgrade to 0.1.2
Diffstat (limited to 'main/acf-provisioning/acf-provisioning.post-upgrade')
-rw-r--r-- | main/acf-provisioning/acf-provisioning.post-upgrade | 47 |
1 files changed, 47 insertions, 0 deletions
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 |