[lsb-discuss] Init Script Example

Stew Benedict stewb at linuxfoundation.org
Thu Jan 27 09:59:30 PST 2011


On 01/27/2011 08:46 AM, Olaf van der Spek wrote:
> On Thu, Jan 27, 2011 at 2:40 PM, Wichmann, Mats D
> <mats.d.wichmann at intel.com> wrote:
>   
>>> http://refspecs.linux-foundation.org/LSB_4.0.0/LSB-Core-generic
>>>       
>> /LSB-Core-generic/iniscrptfunc.html
>>     
>>>> init script functions and requirements are listed. However, I didn't
>>>> find an example script. Would it be possible to include a link to an
>>>> example / skeleton script?
>>>>
>>>> The provided functions seem a bit low-level. Maybe the example script
>>>> would indicate what higher-level functions might be useful.
>>>>         
>>> Somebody?
>>> Is this the wrong list for this kind of question?
>>>       
>> it's the right list
>>
>> don't know - what were you looking for?
>>     
> 1. A skeleton LSB compliant init script that one can base it's own scripts on.
> 2. This (not yet available) script is probably too long, so a better
> API for such scripts would be helpful.
>
> Code duplication should be avoided, so the skeleton should be simple.
>
> For a simple daemon, the input could be:
> NAME=lighttpd
> DAEMON=/usr/sbin/lighttpd
> DAEMON_OPTS="-f /etc/lighttpd/lighttpd.conf"
>
> Ideally the boilerplate required would be just a few lines, instead of
> the current 100+ lines.
>
>   
While by no means a definitive example, here is one we use for the
appbat "lsb-apache":

http://bzr.linuxfoundation.org/loggerhead/lsb/devel/appbat/annotate/head:/scripts/lsb-apache

-- 
Stew Benedict
Linux Foundation




More information about the lsb-discuss mailing list