]> git.openstreetmap.org Git - rails.git/blobdiff - script/vagrant/setup/provision.sh
Upgrade vagrant config to use Ubuntu 14.04
[rails.git] / script / vagrant / setup / provision.sh
index 47534b84d66a4fb7e03a617ba6e77a58284381cd..912a62958af73f9c86b3071800d0c469a785b89c 100644 (file)
@@ -9,16 +9,6 @@ export LC_ALL=en_GB.utf8
 # make sure we have up-to-date packages
 apt-get update
 
-## vagrant grub-pc fix from: https://gist.github.com/jrnickell/6289943
-# parameters
-echo "grub-pc grub-pc/kopt_extracted boolean true" | debconf-set-selections
-echo "grub-pc grub2/linux_cmdline string" | debconf-set-selections
-echo "grub-pc grub-pc/install_devices multiselect /dev/sda" | debconf-set-selections
-echo "grub-pc grub-pc/install_devices_failed_upgrade boolean true" | debconf-set-selections
-echo "grub-pc grub-pc/install_devices_disks_changed multiselect /dev/sda" | debconf-set-selections
-# vagrant grub fix
-dpkg-reconfigure -f noninteractive grub-pc
-
 # upgrade all packages
 apt-get upgrade -y
 
@@ -47,8 +37,9 @@ fi
 # build and set up postgres extensions
 pushd db/functions
 sudo -u vagrant make
-sudo -u vagrant psql openstreetmap -c "drop function if exists maptile_for_point(int8, int8, int4)"
-sudo -u vagrant psql openstreetmap -c "CREATE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 AS '/srv/openstreetmap-website/db/functions/libpgosm.so', 'maptile_for_point' LANGUAGE C STRICT"
+sudo -u vagrant psql openstreetmap -c "CREATE OR REPLACE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 AS '/srv/openstreetmap-website/db/functions/libpgosm.so', 'maptile_for_point' LANGUAGE C STRICT"
+sudo -u vagrant psql openstreetmap -c "CREATE OR REPLACE FUNCTION tile_for_point(int4, int4) RETURNS int8 AS '/srv/openstreetmap-website/db/functions/libpgosm.so', 'tile_for_point' LANGUAGE C STRICT"
+sudo -u vagrant psql openstreetmap -c "CREATE OR REPLACE FUNCTION xid_to_int4(xid) RETURNS int4 AS '/srv/openstreetmap-website/db/functions/libpgosm.so', 'xid_to_int4' LANGUAGE C STRICT"
 popd
 # set up sample configs
 if [ ! -f config/database.yml ]; then