Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
seting the cwd properly for ready and terminate programs
Browse files Browse the repository at this point in the history
  • Loading branch information
buzztroll committed Jul 24, 2012
1 parent ad59f99 commit be0bc85
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 7 deletions.
1 change: 1 addition & 0 deletions cloudinitd/bootfabtasks.py
Expand Up @@ -92,6 +92,7 @@ def readypgm(pgm=None, args=None, stagedir=None, local_exe=None):
if local_exe:
put_pgm(pgm, destpgm)
os.chmod(destpgm, 0755)
os.chdir(stagedir)
else:
put_pgm(pgm, destpgm, mode=0755)

Expand Down
11 changes: 11 additions & 0 deletions tests/plans/localhost/bootpgm.sh
@@ -1,3 +1,14 @@
#!/bin/bash

if [ ! -e bootconf.json ]; then
echo "The boot conf file does not exist!"
pwd
exit 1
fi
if [ ! -e bootenv.sh ]; then
echo "The boot conf file does not exist!"
pwd
exit 1
fi

exit 0
6 changes: 4 additions & 2 deletions tests/plans/localhost/test-level1.conf
@@ -1,6 +1,8 @@
[svc-sampleservice]
bootpgm: bootpgm.sh
readypgm: sampletest.sh
terminatepgm: sampletest.sh
readypgm: bootpgm.sh
terminatepgm: bootpgm.sh
hostname: localhost
local_exe: True
bootconf: bootconf.json
deps: deps.conf
1 change: 1 addition & 0 deletions tests/plans/localhostexe/bootconf.json
@@ -0,0 +1 @@
{"message":"${message}"}
11 changes: 11 additions & 0 deletions tests/plans/localhostexe/bootpgm.sh
@@ -1,3 +1,14 @@
#!/bin/bash

if [ ! -e bootconf.json ]; then
echo "The boot conf file does not exist!"
pwd
exit 1
fi
if [ ! -e bootenv.sh ]; then
echo "The boot conf file does not exist!"
pwd
exit 1
fi

exit 0
3 changes: 3 additions & 0 deletions tests/plans/localhostexe/deps.conf
@@ -0,0 +1,3 @@
[deps]
message: hello world

3 changes: 0 additions & 3 deletions tests/plans/localhostexe/sampletest.sh

This file was deleted.

6 changes: 4 additions & 2 deletions tests/plans/localhostexe/test-level1.conf
@@ -1,6 +1,8 @@
[svc-sampleservice]
bootpgm: bootpgm.sh
readypgm: sampletest.sh
terminatepgm: sampletest.sh
readypgm: bootpgm.sh
terminatepgm: bootpgm.sh
hostname: localhost
local_exe: True
bootconf: bootconf.json
deps: deps.conf

0 comments on commit be0bc85

Please sign in to comment.