From ea38b9eb4567efeb2bb1d48bb6c952708254a26a Mon Sep 17 00:00:00 2001 From: Andreas Hasenack Date: Thu, 25 Apr 2013 13:57:49 -0300 Subject: [PATCH] Use the environment variable CHARM_DIR instead of a hardcoded value. The previous value was not compatible with juju-core. --- hooks/lib/openstack_common.py | 4 ++-- revision | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hooks/lib/openstack_common.py b/hooks/lib/openstack_common.py index d44390c1..b897e5ec 100644 --- a/hooks/lib/openstack_common.py +++ b/hooks/lib/openstack_common.py @@ -221,8 +221,8 @@ def save_script_rc(script_path="scripts/scriptrc", **env_vars): updated config information necessary to perform health checks or service changes. """ - unit_name = os.getenv('JUJU_UNIT_NAME').replace('/', '-') - juju_rc_path = "/var/lib/juju/units/%s/charm/%s" % (unit_name, script_path) + charm_dir = os.getenv('CHARM_DIR') + juju_rc_path = "%s/%s" % (charm_dir, script_path) with open(juju_rc_path, 'wb') as rc_script: rc_script.write( "#!/bin/bash\n") diff --git a/revision b/revision index dc6f4a87..037ba971 100644 --- a/revision +++ b/revision @@ -1 +1 @@ -218 +219