=== Chipp1 [n=Ch1ppy@S0106000d88a35c46.du.shawcable.net] has joined #upstart [02:25] hey, I'm trying to write my own script to run a program on startup, but getting a little confused, can anyone help me out? [02:51] <_ion> I guess he became unconfused in five minutes. === maro [n=mark@0x55511dab.adsl.cybercity.dk] has joined #upstart === Md [i=md@freenode/staff/md] has joined #upstart === Keybuk [n=scott@syndicate.netsplit.com] has joined #upstart === Seveas [n=seveas@ubuntu/member/seveas] has joined #upstart [01:33] morning [01:45] <_ion> Hi [01:55] how goes it? [01:56] <_ion> Well, i'm alive. :-) How are you? [01:58] not so bad [01:58] day off today, though got the xmas shopping done pretty quickly this morning [02:21] xmas shopping? it's not even december yet! [02:22] thom: father coming up this evening for the weekend [02:22] ahr [02:22] so had to get him and his partner something [02:22] got him the DVD of the Live version of Jeff Wayne's War of the Worlds [02:22] (which I took him to see for his Birthday) [02:23] there's a live version? sounds awesome [02:23] yeah [02:23] they did it for about a week in April or so [02:23] tour of most of the arenas in the country [02:24] live band and orchestra on stage, conducted by Jeff Wayne; huge screen behind with CGI and actors playing out the parts; guest singers in front doing the vocal bits; and a big floating head with a CG Richard Burton projected on it talking and doing the narration [02:26] they're doing another tour next year, apparently [02:29] awesome [02:30] <_ion> Sounds cool. :-) === Md [i=md@freenode/staff/md] has joined #upstart === j_ack [n=rudi@p508D929C.dip0.t-ipconnect.de] has joined #upstart === abultman [n=abultman@mta253.mta-telco.com] has joined #upstart [06:07] Good morning; anybody awake here yet? [06:08] morning [06:08] Hey there. Wanna answer a question or two for me? [06:08] sure [06:09] s/Wanna/Can you/ [06:09] Ok, good. I have a daemon I'm trying to run with upstart. It doesn't make a pidfile, and it forks. I need upstart to run this program and restart it when it dies. [06:09] Bit difficult when it forks. So, I edited teh source to make it not fork, so it stays in the foreground. [06:10] *nods* [06:10] a common problem [06:10] Nonforking works, but it doesn't restart my program when it dies. I'm not sure if it's because I don't have 'respawn programname', or because my start/stop scripts in the conf file are dead... [06:10] it's because you don't have "respawn" in the configuration file [06:11] When it runs the daemon-mode one, it fires up 12 copies and then kills them all ;) [06:11] Does the respawn line require the program name and all it's command line switches? [06:11] no [06:11] I thought that went in the start script [06:11] Ok. [06:11] ahh [06:11] I see your confusion [06:11] the "start script" isn't supposed to start the daemon [06:12] it's just supposed to prepare for it [06:12] likewise, the "stop script" isn't supposed to kill it [06:12] (we're renaming them to make this less confusing) [06:12] Ah, ok. [06:12] let's say your daemon is /usr/sbin/foo [06:12] you could get away with just [06:12] ---- [06:12] respawn [06:12] exec /usr/sbin/foo [06:12] ---- [06:12] and upstart would run that command, if it exits, respawn it, and when you do "stop foo", it would kill it [06:12] Oh, so 'exec' is valid. Is there a way I can specify a run-as user? (I don't have envuidgid or anything like that around) [06:13] the start/stop scripts are only needed if you need to make directories or clean up [06:13] So if I have a stop script, I can have the stop script remove any leftover sock files? [06:13] right [06:13] That's what I figured, good. [06:13] I'll let you know how it goes. [06:13] on the forking daemon case, at the moment they must remain in the foreground [06:14] BTW, this is much nicer than daemontools and stupid solaris SMF [06:14] there's a planned feature to allow it to find the forked process [06:14] but that's not finished yet [06:14] Solaris supports daemonized processes, but that's the only benefit [06:15] run-as-user => no; use su or similar [06:16] user jobs are planned, but would run in a full pam session, etc. as cron would [06:16] hmm, pam. would it be possible to make it work without pam? [06:17] not planning to, why? [06:17] frugalware doesn't use pam (slackware roots, you know ;)) [06:17] your mad :) [06:17] I guess you could compile it without pam support or something [06:18] it would be quite easy to get it to work with shadow, as far as i know [06:18] why would it need shadow? [06:18] Keybuk: the upstart people need some better documentation, btw [06:18] the point of pam in this regard is to set up a user environment, with limits, etc. [06:18] abultman: the lack of documentation is ... err ... deliberate [06:18] uhh, i dunno. first thing that popped into my head (i was thinking gnome-screensaver, it has 2 auth methods, pam and shadow) [06:19] we didn't want people shipping upstart job files until we knew the config file format wasn't going to change much [06:19] Keybuk: Ah, ok, it all makes sense now. I was more than a little irritated. I didn't want to hack this server to use daemontools, and upstart seems good enough at the moment... [06:20] daemontools *shudder* [06:20] AlexExtreme: It's nice in some cases [06:20] Trying to get daemontools to log sucks [06:20] abultman: the next few releases will see some major increases in documentation [06:20] *some* cases ;) [06:20] Keybuk: Thank you, that's awesome. [06:22] <_ion> keybuk: Let's say we want to start /usr/sbin/foobard as user:group foobard:foobard from /etc/event.d/foobard. Wouldn't a full pam session be a bit excessive? [06:22] _ion: no [06:23] <_ion> OTOH, it's not like it really causes any overhead now that i think of it. :-) [06:23] Keybuk: awesome, that works perfectly, I haev my daemon starting and stopping correctly now with upstart [06:23] you need the full pam session to ensure that /etc/security stuff still works === Seveas [n=seveas@ubuntu/member/seveas] has joined #upstart === mbiebl [n=michael@e180109085.adsl.alicedsl.de] has joined #upstart === theCore [n=alex@modemcable229.181-131-66.mc.videotron.ca] has joined #upstart === neemz [n=jonathan@80-192-134-217.cable.ubr06.wiga.blueyonder.co.uk] has joined #upstart [11:10] hey folks does anyone know how I can stop a startup sequence from autodetecting hardware in edgy? [11:13] <_ion> Can you define your problem more accurately? (It has probably nothing to do with upstart, btw) [11:14] ohh i thought upstart handled everything at startup [11:14] the problem i'm having is when certain drivers try to load they hang the system [11:15] i want to stop the system from trying to load the driver, either by telling it not to load that one in particular or by completely turning off hardware autodection [11:16] I think you can blacklist it in /etc/hotplug/blacklist [11:17] i can't boot the system to do that though [11:17] <_ion> In edgy, upstart just runs the traditional sysvrc files. In feisty, startup is going to be based on actual upstart jobs. The initramfs scripts will be run before upstart, though. [11:18] is it normal that upstart logging output is send to the "active" tty? [11:18] i shall attempt to mount the filesystem using a rescue cd [11:18] <_ion> I guess creating and editing /etc/modprobe.d/blacklist-local would be a good idea. [11:19] shouldn't be fixed to the last screen? [11:20] <_ion> thecore: Upstart's output or upstart jobs' output? [11:21] jobs' output [11:22] I think I will fill a bug against the Ubuntu's package, but I just want to know if it's really a bug [11:23] <_ion> Remove "console output" or "console owner" from jobs. [11:24] will that remove completely the jobs' output? [11:24] <_ion> The output will go to /var/log/boot by default, currently. [11:25] that wouldn't fix the problem [11:26] I want the output to be send to the Alt-Ctrl-F8's screen [11:27] do you guys know how to go into interactive startup?