Comment 1 for bug 1172722

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This fixed it for gojuju, but is untested for pyjuju:

=== modified file 'hooks/lib/openstack_common.py'
--- hooks/lib/openstack_common.py 2013-03-21 18:25:39 +0000
+++ hooks/lib/openstack_common.py 2013-04-25 14:14:55 +0000
@@ -221,8 +221,8 @@
     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")