[09:37] where are the docs for upstart [09:37] i have a daemon that runs on a typical /etc/init.d script [09:37] to ensure better availability in case it does crash [09:38] jefimenko: man 5 init [09:38] i'd like it to restart automatically [10:22] plautrba: thanks, i've been playing around with things after reading those docs [10:22] how can i source a config file [10:22] like a /etc/default/servicename [10:23] to set environment variables, etc. [12:21] Hi, I have a service that must be run at shutdown/reboot. Before upstart I just used a init script in rc[06]. As my sript depends on dbus, the rc[06] solution is no longer valid, as dbus is stopped before my script runs. I tried a little config file that just runs the script when dbus is about to be stopped (start on stopping dbus), but it doesn't seem to be running at all. I appened the "--debug" flag to the kernel but it doesn't help to me. Any hints? [12:31] Hi, I have a service that must be run at shutdown/reboot. Before upstart I just used a init script in rc[06]. As my sript depends on dbus, the rc[06] solution is no longer valid, as dbus is stopped before my script runs. I tried a little config file that just runs the script when dbus is about to be stopped (start on stopping dbus), but it doesn't seem to be running at all. I appened the "--debug" flag to the kernel but it doesn't help to me. Any hints? [12:46] you mean "stop on stopping dbus" surely? [12:56] My "service" is in fact just a command that doen's daemonize, so I thought it would be starting [12:58] I thought "stop" would only stop something that has previously been started [13:04] ah right [13:04] then yes, use "start on" [13:04] you'll also want to add "task" - that tells Upstart to block D-Bus from stopping until your command completes [13:08] like this? [13:08] description "nfssyncd final" [13:08] start on stopping dbus [13:08] task [13:08] exec nfssyncd-plymouth-final-sync [13:11] right [13:13] so, that should block until my cmd finiches, right? [13:13] *finishes [13:13] right [13:15] it blocks when testing with "service dbus stop", but it doesn't when rebooting with "reboot" or using GDM applet [13:18] there should be no difference between the two [13:18] it may be that on reboot, other things that your task needs aren't around anymore [13:20] I'll take a deeper look, thank you [13:39] Hello, I have the following code in /etc/init/usb-blaster.conf: http://pastebin.com/SnPtBur2 [13:39] the problem is that sometimes the symlink is created, and sometimes not [13:39] what could be the possible problem ? [13:41] AnAnt: two "exec" lines [13:41] only the first will be run [13:41] between script...end script is just shell [13:41] just drop both "exec" [13:41] oh ! silly me [13:41] thanks ! [13:54] Keybuk: btw, it's not a very grown-up move not to accept the comment i posted a week ago on your latest blog story, while accepting later ones... [13:55] mezcalero: ? [13:55] Lennart says: [13:55] Your comment is awaiting moderation. [13:55] May 31, 2010 at 5:35 pm [13:55] hmm, I don't see anything in the pending queue [13:55] let me check spam [13:56] ah, found it [13:56] it's not a very grown-up move to accuse someone of foul play without even asking them ;-) [13:58] * Keybuk clears a couple of others stuck in spam too [13:58] I still a kid inside ;-) [13:59] add an "am" there [16:17] uggh [16:17] somehow I knew this would happen [16:18] magcius: I knew it would to [16:19] Keybuk: thoughts? [16:19] the only thing we can do is fight [16:19] Keybuk: the thing is that the article is half wrong [16:19] the one about the aliens? [16:19] Keybuk: nah, systemd [16:19] oh wait [16:19] yeah, that's the one too [16:20] Keybuk: it says a lot about manual configuration of rules and stuff [16:20] Lennart doesn't "get" Upstart [16:20] Keybuk: but, as I understand it, that's all low-level stuff to make it easy for the system to parse at boot-time, right? There's a higher level [16:20] language/compiler thing, right? [16:21] Keybuk: sshhh, he's in this room. [16:21] I know ;-) [16:21] Keybuk: and I'm surprised at that. [16:21] Keybuk: and we're now falling back to letting D-Bus starting things too [16:22] D-Bus bus activation is an important part of the plan [16:22] yep [16:22] it does for Linux what Mach IPC does for Apple [16:22] oh of course [16:22] (though Apple seem to change their mind on a release by release basis about whether frameworks should use Mach IPC or UNIX sockets) [16:22] Keybuk: so, from what I've heard, the rules files were to make it easy to parse, and were done by hand at first [16:22] the current upstart config? right [16:23] Keybuk: wait, I thought there was a compiler that took a map and generated the rules [16:24] I don't know what you mean by that [16:24] Keybuk: for some reason, I thought there was a higher-level language, and a compiler that took conditions and optimized for them [16:24] in Upstart? no [16:24] that'd be the wrong approach anyway [16:24] Keybuk: like, on an SSD, the compiler would generate different rules than an 6100 RPM HDD [16:25] Keybuk: so how do you handle system services? [16:25] Keybuk: like Apache, etc. etc. [16:26] I'm not sure I know what you're asking [16:27] Keybuk: I must be thinking of another init system [16:27] Keybuk: but if I have a service like httpd to start at boot time [16:27] Keybuk: and I install the package, what rules get put into place to ensure that it does? [16:28] a configuration file in /etc/init [16:28] Keybuk: and is this a sh script that uses the Debian start-stop-daemon stuff? [16:28] no [16:28] ok, so, there's a /etc/init/httpd.rule or something [16:29] right [16:29] and it has "d-bus-started" as a dependency? [16:29] Upstart isn't a dependency-based system [16:29] (and why would a web server need D-Bus?! :p) [16:29] Keybuk: does anything start before d-bus? [16:30] lots of things [16:30] ok [16:30] some things start in parallel with D-Bus too [16:30] magcius: for example if you plug in mod_dnssd into apache it would talk to avahi via dbus to register its services [16:30] Keybuk: the systemd blog post mentioned things like the conditionals in Upstart. Do you know how systemd handles these things WITHOUT them? [16:30] ah [16:31] magcius: through launchd-like functionality [16:31] one service makes an open() or connect() call to the other, which blocks [16:31] mezcalero: are you talking about Upstart or systemd? [16:31] magcius: that sentence was about neither [16:31] the init daemon has prepared the socket in advance, so when it polls, starts the service and passes the socket along to it [16:31] thus services are started by demand [16:32] Keybuk: actually often enough it wouldn't even block, i.e. in the case of syslog [16:32] Dave calls this pay-as-you-go [16:32] Keybuk: it would just enqueue and go on [16:32] mezcalero: indeed [16:32] Keybuk: and no, services are not started on-demand, generally [16:32] you can do that [16:32] makes little sense though except in very few cases such as ssh or cups [16:33] in the general case this is used to parallelize startup [16:33] not to do things on-demand [16:33] doing things on-demand simply delays things [16:33] mezcalero: uh, why would you ever want to not start sshd on boot? [16:33] mezcalero: I was referring to launchd there [16:33] Keybuk: same for launchd [16:33] I'm not sure how you're going to do things with systemd in Fedora [16:33] exactly [16:33] magcius: why would you? only every other month people to tend to log into their laptops with ssh [16:34] magcius: it's not a matter of "not starting" ... sshd is "possible to start" on every boot [16:34] mezcalero: so [16:34] magcius: so it is sufficient to have the port open, so that people can connect and then start it on demand [16:34] mezcalero: if I want to ssh into my home computer from a remote location [16:34] magcius: then connecting to the open ssh port (opened by init) would result in sshd starting, and being passed your connection (actually the listening socket) [16:35] the first connection would take longer due to the overhead of starting ssh [16:35] Keybuk: yeah, gotcha [16:35] magcius: from the clients' perspective little changes... the port is open with or without it [16:35] Keybuk: I forgot that systemd held control of sockets [16:35] but anyway, for stuff like dbus or syslog we don't do on-demand loading [16:35] but then sshd would be running (until a quit time of its own choosing) so subsequent connections while running would be normal [16:35] we start all that in parallel [16:35] does systemd hold all sockets or just the standard <1024 [16:35] Keybuk: actually for sshd we chose to do it like macos, and do it in inetd-like per-connection mode [16:36] Keybuk: but thats the only daemon where we do that [16:36] mezcalero: makes sense, since then you can isolate each login [16:36] about networkmanager, here's another thing I hate [16:36] Keybuk: yepp, it's really nice actually because you get a seperate cgroup named after the connection parameters for each instance [16:36] if you have no wireless, you can't connect to localhost [16:36] Keybuk: o.e. the cgroup carries the clients ip addresses and such [16:36] so you have to go in and uncheck "Enable Wireless" [16:36] magcius: yes you can [16:37] if you can't connect to localhost, you have a bigger problem [16:37] Keybuk: last time I tried, it returned E_AGAIN [16:37] Keybuk: I believe it was either gethostbyaddr or getaddrinfo that failed [16:37] sounds like your box is misconfigured [16:42] it was a fedora box :P [16:42] magcius: I don't really know much about Fedora, sorry [16:43] while recently there's been some movement towards making things like Fedora and Ubuntu more similar [16:44] recent events mean it's more likely they're going to become very different again, possibly even incompatible [16:56] Keybuk: hey, you are welcome to adopt systemd in ubuntu too, to work against that! ;-) [16:56] mezcalero: not going to happen ;-) [17:06] Keybuk: tss, just admit it, deep in your heart you want it too! [17:07] mezcalero: it'd certainly make my life much easier [17:07] but then we'd have to rename our distro to Ubuntu Lennarx [17:11] i am a humble man, no need for that ;-) [17:11] Keybuk: btw, have you seen how i love ubuntu and now am a facebook fan of ubuntu? if that's not proof that i don't hate ubunut i don't know what could be proof enough ;-) [17:12] * Keybuk has one of the "I am Fedora" t-shirts [17:12] can we make out now? [17:13] nope, sorry, not into dudes. Also, I have more Suse shirts than Ubuntu shirts... [17:13] but otoh i have more ubuntu pens than any other distro pens [17:14] mezcalero: ...so who does that leave you making out with? [17:14] but in regards to usb keys mandriva i love the most [17:14] sadmac: Suse is a german girl's name... [17:16] mezcalero: also wasn't it Novell that inserted that cute Linux girl into the I'm a Mac/I'm a PC commercials? [17:16] oh, usb keys I'm totally for ubuntu [17:16] we have boxes full of them at the office [17:16] I never need to pay for portable storage again