Runit dbus and hald
I need to get dbus and hald working under runit.
I'm using debian etch I created /etc/sv/hald/run : Code:
#!/bin/bash Code:
# sv status hald Code:
# sv start hald Code:
# ls -l /var/service/ Code:
# ls -l /etc/sv/* |
bump, anybody?
I noticed its still running /etc/init.d/rcS in /etc/runit/1 which I think is why its still taking a while to bootup. I might spend some time in the future to try and "runit-tize" rcS. I'm going to try putting /etc/init.d/dbus start inside here also and see if it does anything for now. edit: that worked, here is what my /etc/runit/1 looks like for reference: Code:
#!/bin/sh |
No help here, but wanted to acknoledge you.
I had no problems with dbus or anything else besides kdm. Did you install runit-run and runit-services? |
Runit works differently to normal init type scripts. Init type scripts usually spend much time and effort identifying the service they have started and writing it down somewhere (for the init scripts to read later). Runit does a lot of this for you.
This basically means that you have to try and make sure the daemon you are trying to run does not fork itself (use exec), change the user it run's under (use chpst) or background itself (this is your problem). Instead of : exec hald daemon=yes & Use: exec hald daemon=no & I am using : exec chpst -u haldaemon:haldaemon hald --daemon=no 2>&1. At this point (very early stages of migrating Fedora sysv to runit) this may or may not work. You do need to run it under it's own user name. If you don't do this it will fork itself and try and run itself under the right user name and then runit get mightily confused because all the pids are wrong.--demon=no tells hald not to fork. I have found that it is a good idea to use your existing init scripts and remove anything that does what runit is supposed to do (start/stop, supervision, process id, changing users etc.). Thus you are tracking the requirements for your distro. You should be left with the sanity checks that ensure your service knows where everything is and the actual command to start the service. If any variables are required during runtime make sure they are EXPORTed so that any exec's inherit them. Any special commands to stop the service should go in service/finish (i.e anything thats not killing the process) and any special commands to check the status should go in service/check (i.e anything that doesn't check the pid to decide if the service is up or down). The same rules apply if you are going to do custom logging (using the service/log directory). I still haven't found a way to reliably fire off onetime scripts (e.g. network startup, irqbalance oneshot) so any help here would be appreciated. R |
All times are GMT -5. The time now is 07:29 PM. |