Permalink
Browse files

keystone: install default config after emerge if none exists

  • Loading branch information...
1 parent 3e2e8b3 commit cf9d83c96a88da75317b6f31b485c1e76c6d1358 @danielrobbins danielrobbins committed May 7, 2012
Showing with 11 additions and 3 deletions.
  1. +11 −3 sys-auth/keystone/keystone-9999.ebuild
@@ -18,7 +18,7 @@ fi
DESCRIPTION="Keystone is a cloud identity service written in Python, which
provides authentication, authorization, and an OpenStack service catalog. It
-implements OpenStac's Identity API."
+implements OpenStack's Identity API."
HOMEPAGE="https://launchpad.net/keystone"
LICENSE="Apache-2.0"
@@ -46,14 +46,22 @@ src_install() {
newinitd "${FILESDIR}/keystone.initd" keystone
diropts -m 0750
- dodir /var/run/keystone /var/log/keystone
+ keepdir /var/run/keystone /var/log/keystone /etc/keystone
dodoc -r ${S}/etc
if use doc; then
doman ${S}/doc/build/man/keystone.1
dodoc -r ${S}/doc/build/singlehtml
fi
- insinto /etc/keystone
+ insinto /usr/share/keystone/etc
+ sed -i 's|^connection =.*|connection = sqlite:////etc/keystone/keystone.db|' ${S}/etc/keystone.conf.sample || die
doins ${S}/etc/keystone.conf.sample
}
+pkg_postinst() {
+ if [ ! -e $ROOT/etc/keystone/keystone.conf ]; then
+ einfo "Installing default keystone.conf"
+ cp $ROOT/usr/share/keystone/etc/keystone.conf.sample $ROOT/etc/keystone/keystone.conf
+ fi
+}
+

0 comments on commit cf9d83c

Please sign in to comment.