[02:25] <Chipp1> 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.
[01:33] <Keybuk> morning
[01:45] <_ion> Hi
[01:55] <Keybuk> how goes it?
[01:56] <_ion> Well, i'm alive. :-) How are you?
[01:58] <Keybuk> not so bad
[01:58] <Keybuk> day off today, though got the xmas shopping done pretty quickly this morning
[02:21] <thom> xmas shopping? it's not even december yet!
[02:22] <Keybuk> thom: father coming up this evening for the weekend
[02:22] <thom> ahr
[02:22] <Keybuk> so had to get him and his partner something
[02:22] <Keybuk> got him the DVD of the Live version of Jeff Wayne's War of the Worlds
[02:22] <Keybuk> (which I took him to see for his Birthday)
[02:23] <thom> there's a live version? sounds awesome
[02:23] <Keybuk> yeah
[02:23] <Keybuk> they did it for about a week in April or so
[02:23] <Keybuk> tour of most of the arenas in the country
[02:24] <Keybuk> 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] <Keybuk> they're doing another tour next year, apparently
[02:29] <thom> awesome
[02:30] <_ion> Sounds cool. :-)
[06:07] <abultman> Good morning; anybody awake here yet?
[06:08] <Keybuk> morning
[06:08] <abultman> Hey there.  Wanna answer a question or two for me?
[06:08] <Keybuk> sure
[06:09] <abultman> s/Wanna/Can you/
[06:09] <abultman> 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] <abultman> Bit difficult when it forks.  So, I edited teh source to make it not fork, so it stays in the foreground.
[06:10] <Keybuk> *nods*
[06:10] <Keybuk> a common problem
[06:10] <abultman> 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] <Keybuk> it's because you don't have "respawn" in the configuration file
[06:11] <abultman> When it runs the daemon-mode one, it fires up 12 copies and then kills them all ;)
[06:11] <abultman> Does the respawn line require the program name and all it's command line switches?
[06:11] <Keybuk> no
[06:11] <abultman> I  thought that went in the start script
[06:11] <abultman> Ok.
[06:11] <Keybuk> ahh
[06:11] <Keybuk> I see your confusion
[06:11] <Keybuk> the "start script" isn't supposed to start the daemon
[06:12] <Keybuk> it's just supposed to prepare for it
[06:12] <Keybuk> likewise, the "stop script" isn't supposed to kill it
[06:12] <Keybuk> (we're renaming them to make this less confusing)
[06:12] <abultman> Ah, ok.  
[06:12] <Keybuk> let's say your daemon is /usr/sbin/foo
[06:12] <Keybuk> you could get away with just
[06:12] <Keybuk> ----
[06:12] <Keybuk> respawn
[06:12] <Keybuk> exec /usr/sbin/foo
[06:12] <Keybuk> ----
[06:12] <Keybuk> and upstart would run that command, if it exits, respawn it, and when you do "stop foo", it would kill it
[06:12] <abultman> 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] <Keybuk> the start/stop scripts are only needed if you need to make directories or clean up
[06:13] <abultman> So if I have a stop script, I can have the stop script remove any leftover sock files?
[06:13] <Keybuk> right
[06:13] <abultman> That's what I figured, good.
[06:13] <abultman> I'll let you know how it goes.  
[06:13] <Keybuk> on the forking daemon case, at the moment they must remain in the foreground
[06:14] <abultman> BTW, this is much nicer than daemontools and stupid solaris SMF
[06:14] <Keybuk> there's a planned feature to allow it to find the forked process
[06:14] <Keybuk> but that's not finished yet
[06:14] <abultman> Solaris supports daemonized processes, but that's the only benefit 
[06:15] <Keybuk> run-as-user => no; use su or similar
[06:16] <Keybuk> user jobs are planned, but would run in a full pam session, etc. as cron would
[06:16] <AlexExtreme> hmm, pam. would it be possible to make it work without pam?
[06:17] <Keybuk> not planning to, why?
[06:17] <AlexExtreme> frugalware doesn't use pam (slackware roots, you know ;))
[06:17] <Keybuk> your mad :)
[06:17] <Keybuk> I guess you could compile it without pam support or something
[06:18] <AlexExtreme> it would be quite easy to get it to work with shadow, as far as i know
[06:18] <Keybuk> why would it need shadow?
[06:18] <abultman> Keybuk: the upstart people need some better documentation, btw
[06:18] <Keybuk> the point of pam in this regard is to set up a user environment, with limits, etc.
[06:18] <Keybuk> abultman: the lack of documentation is ... err ... deliberate
[06:18] <AlexExtreme> 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] <Keybuk> we didn't want people shipping upstart job files until we knew the config file format wasn't going to change much
[06:19] <abultman> 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] <AlexExtreme> daemontools *shudder*
[06:20] <abultman> AlexExtreme: It's nice in some cases
[06:20] <abultman> Trying to get daemontools to log sucks
[06:20] <Keybuk> abultman: the next few releases will see some major increases in documentation
[06:20] <AlexExtreme> *some* cases ;)
[06:20] <abultman> 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] <Keybuk> _ion: no
[06:23] <_ion> OTOH, it's not like it really causes any overhead now that i think of it. :-)
[06:23] <abultman> Keybuk: awesome, that works perfectly, I haev my daemon starting and stopping correctly now with upstart
[06:23] <Keybuk> you need the full pam session to ensure that /etc/security stuff still works
[11:10] <neemz> 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] <neemz> ohh i thought upstart handled everything at startup
[11:14] <neemz> the problem i'm having is when certain drivers try to load they hang the system
[11:15] <neemz> 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] <tonfa> I think you can blacklist it in /etc/hotplug/blacklist
[11:17] <neemz> 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] <theCore> is it normal that upstart logging output is send to the "active" tty? 
[11:18] <neemz> 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] <theCore> shouldn't be fixed to the last screen?
[11:20] <_ion> thecore: Upstart's output or upstart jobs' output?
[11:21] <theCore> jobs' output
[11:22] <theCore> 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] <theCore> will that remove completely the jobs' output?
[11:24] <_ion> The output will go to /var/log/boot by default, currently.
[11:25] <theCore> that wouldn't fix the problem
[11:26] <theCore> I want the output to be send to the Alt-Ctrl-F8's screen  
[11:27] <neemz> do you guys know how to go into interactive startup?