Port-xen archive

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

Re: Improved xendomains script



On Mon, Oct 17, 2005 at 09:43:35AM +0000, Johnny C. Lam wrote:
>       # 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
>               fi
>       fi
>
> ...
>
>       # Finish off by running the post-hook script if it's present.
>       for domain in $xendomains; do
>               case "$domain" in
>               "")     continue ;;
>               esac
>               if [ -n "${xendomains_posthook}" ]; then
>                       cmdline=`printf "${xendomains_posthook}" $domain`
>                       cmd="${cmdline%% *}"
>                       if [ -x "$cmd" ]; then
>                               $cmdline || echo "Post-hook \`\`$cmdline'' 
> failed."
>                       fi
>               fi
>       done

is there any reason why you don't use _precmd and _postcmd provided by
rc.d?

regards,

-- 
-- Lubomir Sedlacik <salo@{NetBSD,Xtrmntr,silcnet}.org>   --

Attachment: pgp4Usl7DNnBb.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index