From 7fa33eed1882a86b40d000bc2cfee9628db2e697 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 22 Jun 2010 14:39:28 +0200 Subject: [PATCH] cosmetic stuff that was lost in the mix --- system/config_default.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/system/config_default.py b/system/config_default.py index ee1b4c5..337132a 100644 --- a/system/config_default.py +++ b/system/config_default.py @@ -137,19 +137,27 @@ def initscripts(options,index): { 'enabled' : True, 'name':'script1', 'script' : """#! /bin/sh -(echo Starting test initscript: script1; date) > /tmp/script1.stamp -echo "This is the stdout of the sliver initscript" -echo "This is the stderr of the sliver initscript" 1>&2 +(echo Starting test initscript: script1; date) >> /tmp/script1.stamp +# expected to be 'start' +command=$1; shift +# get slice name +slicename=$1; shift +echo "This is the stdout of the sliver $slicename initscript $command (exp. start) pid=$$" +echo "This is the stderr of the sliver $slicename initscript $command (exp. start) pid=$$" 1>&2 """, }}, { 'initscript_fields' : { 'enabled' : True, 'name':'script2', 'script' : """#! /bin/sh -(echo Starting loop-forever test initscript: script2; date) > /tmp/script2.stamp +(echo Starting loop-forever test initscript: script2; date) >> /tmp/script2.stamp +# expected to be 'start' +command=$1; shift +# get slice name +slicename=$1; shift while true; do -echo "This is the stdout of the loop-for-ever sliver initscript" -echo "This is the stderr of the loop-for-ever sliver initscript" 1>&2 +echo "This is the stdout of the loop-for-ever sliver initscript $slicename $command (exp. start) $$" +echo "This is the stderr of the loop-for-ever sliver initscript $slicename $command (exp. start) $$" 1>&2 sleep 10 done """, -- 2.43.0