port to SUSE: part 1, from barclamp-postgres

work by Ralf Haferkamp from
https://github.com/SUSE-Cloud/barclamp-postgresql/tree/release/essex-hack-suse/master/chef/cookbooks/postgresql
except the crowbar specific parts