Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

xendomains rc.d script



The following code fragment is in the xendomains_start() function of
the xentools41 xendomains rc.d script:

     # Start off by running the pre-hook script if it's present.
     if [ -n "${xendomains_prehook}" ]; then
         cmdline=`printf "${xendomains_prehook}" $domain`
         cmd="${cmdline%% *}"
         if [ -x "$cmd" ]; then
            $cmdline || echo "Pre-hook \`\`$cmdline'' failed... skipping 
$domain."
            continue # <- why this?
         fi
     fi

This fragment is executed for each of the xen domains and is intended to run a 
pre-hook script prior to starting each domain.  However, it seems to me that 
the 'continue' statement will cause the domain to be skipped if a pre-hook 
script exists.

Shouldn't this script place the 'continue' statement in a conditional dependent 
on whether or not the command failed?

Cheers,
Brook


Home | Main Index | Thread Index | Old Index