[Initng] A new idea

Ismael Luceno ismael.luceno at gmail.com
Fri Apr 13 05:32:23 CEST 2007


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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://jw.dyndns.org/pipermail/initng/attachments/20070413/5fd2edeb/attachment.pgp 


More information about the Initng mailing list