/srv/irclogs.ubuntu.com/2006/11/30/#upstart.txt

=== Chipp1 [n=Ch1ppy@S0106000d88a35c46.du.shawcable.net] has joined #upstart
Chipp1hey, 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:25
_ionI guess he became unconfused in five minutes.02:51
=== 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
Keybukmorning01:33
_ionHi01:45
Keybukhow goes it?01:55
_ionWell, i'm alive. :-) How are you?01:56
Keybuknot so bad01:58
Keybukday off today, though got the xmas shopping done pretty quickly this morning01:58
thomxmas shopping? it's not even december yet!02:21
Keybukthom: father coming up this evening for the weekend02:22
thomahr02:22
Keybukso had to get him and his partner something02:22
Keybukgot him the DVD of the Live version of Jeff Wayne's War of the Worlds02:22
Keybuk(which I took him to see for his Birthday)02:22
thomthere's a live version? sounds awesome02:23
Keybukyeah02:23
Keybukthey did it for about a week in April or so02:23
Keybuktour of most of the arenas in the country02:23
Keybuklive 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 narration02:24
Keybukthey're doing another tour next year, apparently02:26
thomawesome02:29
_ionSounds cool. :-)02:30
=== 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
abultmanGood morning; anybody awake here yet?06:07
Keybukmorning06:08
abultmanHey there.  Wanna answer a question or two for me?06:08
Keybuksure06:08
abultmans/Wanna/Can you/06:09
abultmanOk, 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
abultmanBit difficult when it forks.  So, I edited teh source to make it not fork, so it stays in the foreground.06:09
Keybuk*nods*06:10
Keybuka common problem06:10
abultmanNonforking 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
Keybukit's because you don't have "respawn" in the configuration file06:10
abultmanWhen it runs the daemon-mode one, it fires up 12 copies and then kills them all ;)06:11
abultmanDoes the respawn line require the program name and all it's command line switches?06:11
Keybukno06:11
abultmanI  thought that went in the start script06:11
abultmanOk.06:11
Keybukahh06:11
KeybukI see your confusion06:11
Keybukthe "start script" isn't supposed to start the daemon06:11
Keybukit's just supposed to prepare for it06:12
Keybuklikewise, the "stop script" isn't supposed to kill it06:12
Keybuk(we're renaming them to make this less confusing)06:12
abultmanAh, ok.  06:12
Keybuklet's say your daemon is /usr/sbin/foo06:12
Keybukyou could get away with just06:12
Keybuk----06:12
Keybukrespawn06:12
Keybukexec /usr/sbin/foo06:12
Keybuk----06:12
Keybukand upstart would run that command, if it exits, respawn it, and when you do "stop foo", it would kill it06:12
abultmanOh, 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:12
Keybukthe start/stop scripts are only needed if you need to make directories or clean up06:13
abultmanSo if I have a stop script, I can have the stop script remove any leftover sock files?06:13
Keybukright06:13
abultmanThat's what I figured, good.06:13
abultmanI'll let you know how it goes.  06:13
Keybukon the forking daemon case, at the moment they must remain in the foreground06:13
abultmanBTW, this is much nicer than daemontools and stupid solaris SMF06:14
Keybukthere's a planned feature to allow it to find the forked process06:14
Keybukbut that's not finished yet06:14
abultmanSolaris supports daemonized processes, but that's the only benefit 06:14
Keybukrun-as-user => no; use su or similar06:15
Keybukuser jobs are planned, but would run in a full pam session, etc. as cron would06:16
AlexExtremehmm, pam. would it be possible to make it work without pam?06:16
Keybuknot planning to, why?06:17
AlexExtremefrugalware doesn't use pam (slackware roots, you know ;))06:17
Keybukyour mad :)06:17
KeybukI guess you could compile it without pam support or something06:17
AlexExtremeit would be quite easy to get it to work with shadow, as far as i know06:18
Keybukwhy would it need shadow?06:18
abultmanKeybuk: the upstart people need some better documentation, btw06:18
Keybukthe point of pam in this regard is to set up a user environment, with limits, etc.06:18
Keybukabultman: the lack of documentation is ... err ... deliberate06:18
AlexExtremeuhh, i dunno. first thing that popped into my head (i was thinking gnome-screensaver, it has 2 auth methods, pam and shadow)06:18
Keybukwe didn't want people shipping upstart job files until we knew the config file format wasn't going to change much06:19
abultmanKeybuk: 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:19
AlexExtremedaemontools *shudder*06:20
abultmanAlexExtreme: It's nice in some cases06:20
abultmanTrying to get daemontools to log sucks06:20
Keybukabultman: the next few releases will see some major increases in documentation06:20
AlexExtreme*some* cases ;)06:20
abultmanKeybuk: Thank you, that's awesome. 06:20
_ionkeybuk: 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: no06:22
_ionOTOH, it's not like it really causes any overhead now that i think of it. :-)06:23
abultmanKeybuk: awesome, that works perfectly, I haev my daemon starting and stopping correctly now with upstart06:23
Keybukyou need the full pam session to ensure that /etc/security stuff still works06:23
=== 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
neemzhey folks does anyone know how I can stop a startup sequence from autodetecting hardware in edgy?11:10
_ionCan you define your problem more accurately? (It has probably nothing to do with upstart, btw)11:13
neemzohh i thought upstart handled everything at startup11:14
neemzthe problem i'm having is when certain drivers try to load they hang the system11:14
neemzi 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 autodection11:15
tonfaI think you can blacklist it in /etc/hotplug/blacklist11:16
neemzi can't boot the system to do that though11:17
_ionIn 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:17
theCoreis it normal that upstart logging output is send to the "active" tty? 11:18
neemzi shall attempt to mount the filesystem using a rescue cd11:18
_ionI guess creating and editing /etc/modprobe.d/blacklist-local would be a good idea.11:18
theCoreshouldn't be fixed to the last screen?11:19
_ionthecore: Upstart's output or upstart jobs' output?11:20
theCorejobs' output11:21
theCoreI think I will fill a bug against the Ubuntu's package, but I just want to know if it's really a bug11:22
_ionRemove "console output" or "console owner" from jobs.11:23
theCorewill that remove completely the jobs' output?11:24
_ionThe output will go to /var/log/boot by default, currently.11:24
theCorethat wouldn't fix the problem11:25
theCoreI want the output to be send to the Alt-Ctrl-F8's screen  11:26
neemzdo you guys know how to go into interactive startup? 11:27

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!