[Initng] An improvement for runiscript
Ismael Luceno
ismael.luceno at gmail.com
Fri Mar 9 05:27:42 CET 2007
Ismael Luceno escribió:
> Ismael Luceno escribió:
>> I want to make runiscript more generic.
>>
>> I'm thinking about moving the current code added by runiscript to a
>> wrapper script.
>>
>> That way we can do something like:
>>
>> $ runiscript bash /path/to/the/script
>>
>> And runscript should run something like
>> $ /lib/initng/scripts/bash /path/to/the/script
>>
>> That will ease adding support for other shells, and maybe some
>> compatibility stuff, as it will only require writting a script :).
>>
>> What do you think guys?
>>
>
> Wrapper scripts will look like:
>
> #!/bin/sh
>
> eval "${COMMAND}() {
> echo \"ERROR: ${SERVICE} command ${COMMAND} not found.\"
> return 1
> }"
>
> export PATH="/lib/ibin:${PATH}"
> source "${SERVICE_FILE}"
>
> ${COMMAND}
>
I've commited the code for the wrappers stuff, so they need testing ;).
Wrappers are a great way to modify the way in that services are
loaded... :)
-------------- 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/20070309/a87bdb7c/attachment.pgp
More information about the Initng
mailing list