Essien Ita Essien wrote:
> Jürgen Hötzel wrote:
>> On Sun, Jun 03, 2007 at 10:10:38PM +0300, Hussam Al-Tayeb wrote:
>>> On Sun, 2007-06-03 at 17:08 +0200, Jürgen Hötzel wrote:
>>>> On Sun, Jun 03, 2007 at 04:40:33PM +0200, Kevin Bader wrote:
>>>>> Nice script, but I don't think such a script is very useful since 
>>>>> the order of the daemons array is important. So it's better to use 
>>>>> an editor I guess ;-)
>>>>>
>>>> Yes, this script is just appending, which is OK for most services 
>>>> you add.
>>>> Implementing order should be easy -> this is left to the reader ;)
>>>>
>>>> Jürgen
>>>>
>>>> _______________________________________________
>>>> arch mailing list
>>>> [email protected]
>>>> http://archlinux.org/mailman/listinfo/arch
>>> I can do the reordering thing. It's not hard. But I would require a
>>> default list of how the ordering should be. If anyone can provide a list
>>> of all the daemons that Archlinux ships and their correct order, I would
>>> much appreciate this.
>>
>> Unlike other distros, Arch Linux doesn't have dependency information
>> encoded in init scripts.
>>
>> I couldn't resist. So I extended my script (inspired by 'chkconfig') 
>> do enable/disable
>> services and allow ordering:
>>
>> Usage: daemons.sh [-b daemon] add|remove|enable|disable daemon 
>> [daemon]...
>>
>> If you want to add iptables before network:
>>
>> daemons.sh  -b network add iptables
>>
>> If you want to disable iptables
>>
>> daemons.sh disable iptables
>>
>> Jürgen
> talk about not being able to resist :)
> 
> I had this service script i've been using forever on my various arch 
> boxes that does 'service start|restart|status' on /etc/rc.d/foobar.
> 
> I've merged in Jurgen's daemons.sh, so this is now much more usefull.
> 
> MiniHelp :P
>  - Just running 'service' will give you a list of all 'running' services
>  - Running service -a, will give you a list of all services (heh!)
>  - Running 'service foobar start|restart|status' will do what you expect :)
>   - Add running 'service foobar enable|disable|add|remove' will also do 
> what you expect.
>  - Running 'service -b frumpel foobar add, will add service foobar to 
> the DAEMONS array before service frumpel
> 
> BUG: This doesn't work well with 'background' services... if someone 
> doesn't beat me to it, i'll extend it to properly support background 
> services (the @foobar variety i mean)
> 
> hehe... nice work Jurgen
> 
> Cheers,
> Essien
quick word on the API. Why do i do 'service foobar [action]' instead of 
'service [action] foobar'.

Short Answer: usability

Long Answer: I tried that, since i really didn't understand why the 
'service' script on Fedora et. al. was *upsidedown* in my own narrow 
world view. Anyways.. after working at the shell and having to do this:

service start foobar
^H^H
restart foobar
^H^H
restart foobar

too many times... i totally appreciated being able to do:

service foobar start
^H
restart
^H
restart

its never too early to prevent Carpal Tunnel syndrome :)

cheers,
Essien
> 
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> arch mailing list
>> [email protected]
>> http://archlinux.org/mailman/listinfo/arch
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> arch mailing list
> [email protected]
> http://archlinux.org/mailman/listinfo/arch


_______________________________________________
arch mailing list
[email protected]
http://archlinux.org/mailman/listinfo/arch

Reply via email to