/srv/irclogs.ubuntu.com/2010/01/25/#upstart.txt

einstein1969hi12:17
einstein1969how to change level to single mode in ubuntu?12:17
soljhey everyone, i'm very new to upstart and trying to write a simple script that will run during startup; i have http://upstart.pastebin.com/m6f8fa569 working when run manually, but fails to start during startup15:21
soljthis is on lucid15:21
solji'm sure i'm missing something simple, but couldn't find the answer on the website15:23
soljis there an update-rc.d analog for upstart?15:37
=== roobiew_ is now known as robbiew
sadmacsolj: it looks right, but I'm betting it runs before the xserver17:25
soljsadmac: so, the init process will automatically look at any conf files in /etc/init?17:26
sadmacsolj: it detects when they're modified and reloads them17:27
soljsadmac: hmm, it doesn't appear to run at all during startup :-/17:28
sadmacsolj: no idea why. output should be suppressed if you're looking for evidence of it that way17:29
soljwell, that command should configure xorg.conf for me (which it does when i do a 'service start <servicename>')17:29
soljjust doesn't run during startup17:29
=== mbiebl_ is now known as mbiebl
JanCsolj: maybe it runs before something it needs is loaded and doesn't work because of that, or something like that?17:55
JanC(just guessing)17:55
soljyeah, i also tried changing it to run only during runlevel 5, but that didn't appear to help17:56
solji guess i just need to figure out a way to debug it17:57
JanCwell, you can add a simple command that writes something to a file before running nvidia-xconfig to make sure whether it gets started or not18:01
JanCor redirect nvidia-xconfig's output (stout & stderr) to a file?18:02
=== rberger_ is now known as rberger
soljJanC: tried adding debug statements in there and get nothing20:22
soljso, it's definitely not running at boot20:22
sadmac2solj: they'll be hidden unless you explicitly direct them to /dev/console20:38
soljsadmac2: it's not being run; i'm going to try adding a boot option to run init with --debug20:41
sadmac2ok20:41
soljsadmac2: ok, i confirmed it's not being run; i do see it as having been registered previously21:03
soljso, i have no idea what to do to debug now21:03
soljsince the only things logged when running init verbosely are those things which get started21:04
sadmac2solj: why do you need to rewrite xorg.conf on every boot btw?21:04
sadmac2solj: at any rate try making it start on foo and then use initctl emit foo to start it21:05
soljsadmac2: i don't; i wanted to get an upstart job running at boot so i can do something more interesting21:05
sadmac2solj: ah :)21:05
sadmac2solj: yeah, see if you can event-trigger it via another event21:06
soljk, i'll try that21:06
soljsadmac2: doing that works21:21
sadmac2solj: ok, so the startup event is the issue...21:21
solji also tried doing the runlevel syntax21:22
sadmac2solj: you tried start on runlevel 5?21:22
soljlet me try just 521:22
sadmac2weird21:22
solji think i had tried multiple ones before21:22
soljthat didn't work either21:24
soljhmm.21:24
soljnot sure if it helps any, but this is on lucid21:26
soljand grep emit /etc/init/* only returns http://upstart.pastebin.com/m66e3e86b21:27
soljsadmac2: got it to work :-/21:33
soljstart on started tty121:33
sadmac2solj: intriguing21:33
sadmac2solj: it should work as you had it I'd think21:33
soljsadmac2: that's what i thought21:35
soljsadmac2: anything i can do to test for you, let me know21:35
sadmac2solj: it'd be good to know if you see the startup event getting emitted during boot21:41
soljsadmac2: i'm not seeing it21:42
* sadmac2 tries to remember if it was scrapped21:42
sadmac2solj: you'd need debug on to see it21:42
sadmac2solj: init=/sbin/init --verbose21:42
soljsadmac2: right, i already added that21:43
sadmac2solj: do you see the runlevel stuff?21:43
soljsadmac2: only numerous "Handling runlevel event" messages21:43
soljactually, it looks like one per boot21:44
sadmac2ok so the runlevel event should have worked I'd think21:44
soljsadmac2: i don't see any runlevel {1,2,3,...} being emited21:44
soljjust the handling message21:45
sadmac2solj: yeah the event is just "runlevel"21:45
sadmac2the number would be an argument21:45
soljhmm, ok21:45
sadmac2ok fedora rcS.conf uses the startup event...21:46
soljlucid uses "start on runlevel S"21:46
sadmac2I don't know this lucid thing21:47
soljsadmac2: ubuntu lucid?21:47
soljkarmic+121:47
sadmac2solj: ah. heh :)21:47
sadmac2solj: I don't follow ubuntu.21:47
sadmac2as much as I should really21:48
soljah, i see21:48
sadmac2Scott hasn't been around to clue me in either21:48
soljthe main reason i'm trying this is because we are working on preparing a customized ubuntu distro which we use and would like to convert our init scripts to upstart if possible21:48

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