Re: Runit questions
On Tue, Oct 11, 2016 at 3:09 PM, Andy Menderwrote: > Hello again, > > I'm rewriting some of the standard sysvinit and openrc scripts to ./run > scripts > I would look around a bit. There are little pockets of pre-written scripts out there, you just need to dig them up. Some of the scripts on smarden.org may have minor issues with the daemon flags they use, so if it doesn't work, go read the man page and compare the flags in the script to the flags for your installed daemon. > and I have some problems with dbus. I took the ./run script from Void Linux > as the original runit documentation doesn't have an exemplary dbus script. > Whenever I check the status of dbus via "sv status dbus", I get the > following > error: "warning: dbus: unable to open supervise/ok: file does not exist". > This > makes no sense, as both /etc/sv/dbus/supervise/ and > /var/service/dbus/supervise/ > contain the "ok" file. Below the run script from Void Linux: > #!/bin/sh > [ ! -d /run/dbus ] && install -m755 -g 22 -o 22 -d /run/dbus > exec dbus-daemon --system --nofork --nopidfile > Here is a hacked-up copy of my ./run script. Be sure to change the "messagebus" user name after the setuidgid to the proper daemon account for your installation. Sorry for the backslash, the word-wrap in the posting would otherwise kill any formatting. #!/bin/sh exec 2>&1 PATH=/sbin:/bin:/usr/sbin:/usr/bin # must have a valid procfs mountpoint -q /proc/ || exit 1 # create a unique identifier on each startup dbus-uuidgen --ensure || exit 1 # start the service exec pgrphack setuidgid messagebus \ dbus-daemon --nofork --system --nopidfile > > Not sure what's wrong and why this run script needs to contain so many > operands. > The daemon's runtime directory needs to exist before it is launched. The first line after the shebang basically does that.
Re: Runit questions
On Thu, 13 Oct 2016 12:16:52 +0200 Andy Menderwrote: > I was recently trying to convert my OpenRC-based Gentoo installation > into one based on runit. However, I noticed that it's quite easy to > send runsvdir or runsvchdir into an infinite loop when there is > something wrong with a service directory or the runlevel dir selected > through runsvchdir is missing. > Is there something potentially wrong with my setup or is this normal? I know nothing about runsvchdir, but with runsvdir, well, it's *supposed* to be an infinite loop. It loops the service directory forever, starting what needs to be started. Could you please elaborate on the symptom that happens to you when there's something wrong with a service directory, and if possible articulate on the flaw in that service directory? Thanks, SteveT Steve Litt September 2016 featured book: Twenty Eight Tales of Troubleshooting http://www.troubleshooters.com/28
Re: Runit questions
I was recently trying to convert my OpenRC-based Gentoo installation into one based on runit. However, I noticed that it's quite easy to send runsvdir or runsvchdir into an infinite loop when there is something wrong with a service directory or the runlevel dir selected through runsvchdir is missing. Is there something potentially wrong with my setup or is this normal? Best regards, Andy Mender On 12 October 2016 at 20:03, Colin Boothwrote: > On Tue, Oct 11, 2016 at 9:11 PM, Jonathan de Boyne Pollard > wrote: > > Colin Booth: > >> > >> --system loads the system defaults. > > > > Actually, it tells it that it is a system-wide broker rather than a > > per-session or per-user broker. > > Interesting. Then the manpage is lying: >--system >Use the standard configuration file for the systemwide message > bus. > > From my reading of that, --system isn't needed to run a system-wide > broker if you pass it an alternate config file with the configs needed > to run as a system-wide broker. Either way, --system is generally > needed to have dbus do the right thing for overall system tasks. > > Cheers! > > -- > "If the doors of perception were cleansed every thing would appear to > man as it is, infinite. For man has closed himself up, till he sees > all things thru' narrow chinks of his cavern." > -- William Blake >