I got a new idea:
ireg()
{
[ -n "${2}" -a "${SERVICE}" != "${2}" ] && return 1
iregister "${1}" || exit ${?}
_atexit=idone
}
It can make setup() look like:
setup()
{
ireg service service/some_service && {
iset need = system/bootmisc
iexec start
iexec stop
}
}
It also solves one of the problems Jimmy mentioned...
I think script's look should be consistent across all our scripts,
that's why i think this function is needed.
$_atexit will be called after $CMD, so it will execute idone if
some service has been registered.
signature.asc
Description: OpenPGP digital signature
-- _______________________________________________ Initng mailing list [EMAIL PROTECTED] http://jw.dyndns.org/mailman/listinfo/initng
