Subject: Re: Improved xendomains script
To: Johnny C. Lam <jlam@pkgsrc.org>
From: Lubomir Sedlacik <salo@Xtrmntr.org>
List: port-xen
Date: 10/17/2005 13:45:34
--C94crkcyjafcjHxo
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
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=3D`printf "${xendomains_prehook}" $domain`
> cmd=3D"${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=3D`printf "${xendomains_posthook}" $domain`
> cmd=3D"${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,
--=20
-- Lubomir Sedlacik <salo@{NetBSD,Xtrmntr,silcnet}.org> --
--C94crkcyjafcjHxo
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)
iD8DBQFDU47eiwjDDlS8cmMRAicmAJ48RGGbABBDwv6B/shfTW0cO+IW1gCfa+rL
qCdFzkRPWv7wrYUhWZxIyGo=
=C/mQ
-----END PGP SIGNATURE-----
--C94crkcyjafcjHxo--