[Initng] A new idea

Jimmy Wennlund jimmy.wennlund at gmail.com
Fri Apr 13 10:19:55 CEST 2007


Looks werry nice, if there was not for the && before { it woud really
look like the old system again,

Keep up the good work!

/J


fre 2007-04-13 klockan 00:32 -0300 skrev Ismael Luceno:
> 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.
> 
> 



More information about the Initng mailing list