Commit 4b84b1ff by Julien Muchembled

randomsleep: cleanup

1 parent eb4fc00a
Pipeline #6294 for 4b84b1ff failed in 0 seconds
......@@ -7,16 +7,16 @@ extends =
recipe = slapos.recipe.build
location = ${buildout:parts-directory}/${:_buildout_section_name_}
bin_dir = ${buildout:bin-directory}
bash_script_code =
bash_script_code =
if [ "$#" -ne 1 ]; then
echo "usage: randomsleep maxseconds"
exit
fi
${coreutils:location}/bin/sleep $((RANDOM % $1)).$((RANDOM % 100))
wrapper_script_code =
exec ${coreutils:location}/bin/sleep $((RANDOM * $1 >> 15)).$((RANDOM * 100 >> 15))
wrapper_script_code =
#!${bash:location}/bin/bash
${bash:location}/bin/bash ${:location}/randomsleep.bash "$@"
script =
. ${:location}/randomsleep.bash
script =
os.makedirs(self.options['location'])
bash_script_path = os.path.join(self.options['location'], 'randomsleep.bash')
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!