/srv/irclogs.ubuntu.com/2011/08/18/#upstart.txt

gokulnathHello, this is my upstart script -->> http://pastie.org/238988405:38
gokulnathBut when I rebooted the machine the process was not started05:38
samaramahi 08:05
samaramahow can i find out whether my system already uses upstart or not?08:05
jhuntwhat does "which initctl" return?08:06
jhuntactually "ls /sbin/initctl" is safer08:06
samaramai dont know wheter my system uses sysvinit or upstart. is there a way to find out?08:08
jhuntIf you have initctl installed, you are more than likely using upstart.08:08
jhuntwhat O/S is it?08:09
samaramaubuntu 10.04 lts08:09
jhuntyou're using upstart then :)08:09
samaramaok. thx. on a sidenote: is there no way to find that out by checking the system itself? like some entry in /proc or somethin?08:11
pmjdebruijnsamarama: dpkg -l upstart ?08:11
pmjdebruijnthough that just checks if it's installed, not if it's actually being used08:13
jhuntthe problem isn't detecting upstart, it's detecting that the system *isn't* upstart.08:13
jhuntUpstart supports "/sbin/init --version"08:13
jhunt... but that will do bad things on some SysV systems as they might ignore "--version".08:14
jhuntyou could run "strings /sbin/init" and parse the output (since SysV encodes an ident string usually and upstart has a string that encodes the output of "/sbin/init --version".08:15
jhuntnot though that the strings idea isn't reliable for the same reason as mentioned by pmjdebruijn - you might get back the wrong version details if init was recently upgraded.08:16
=== JanC_ is now known as JanC
flu-Does it make sense to continue using my /etc/init.d script after converting the service over to use upstart? I have some specific functionality in that script (starting with profiler hooks enabled for instance) that I'm having trouble duplicating with upstart17:06
flu-so I guess a related question is, can I have arbitrary script stanzas that file on particular events?17:06
JanCflu-: do you mean that you want other actions than start & stop?17:29
flu-correct17:30
flu-To put it in concrete terms, my existing /etc/init.d service templates respond to start, stop, restart, start-profiler and start-foreground17:30
flu-the latter two used for diagnosing issues with the service17:30
JanCone thing you could do is make a second job that starts the service with profiling17:31
flu-and perhaps stop any existing instance before starting?17:31
JanCor you could use arguments to enable profiling17:32
flu-I think I like the argument approach17:37
flu-I could then test if some environment variable is set in my script stanza, correct?17:37
JanCyes17:37
flu-nice. Think this will work just fine, thanks for the help JanC 17:43
pmjdebruijnhi again18:33
pmjdebruijndoes anybody here know if there an easy way to _safely_ delay the tty's18:33
pmjdebruijnI rather wouldn't depend them on something else (and risk not getting them at all because of an unsatisfied dependancy)18:34
pmjdebruijnpart of my current (small) problem is that the tty's pop up with the wrong hostname which is set during the boot process (based on reverse dns)18:34
pmjdebruijnoften a tty pops up with localhost still18:34
pmjdebruijnI wouldn't mean just delaying them 60 seconds or so18:35
=== flu_ is now known as flu-
flu-So I've created a new upstart job in /etc/init/commerce.conf, but I'm not seeing it in the output from 'initctl list'. I tried 'initctl reload-configuration' but it still doesn't show, what else can I check to see what's happening here?20:55
JanCflu-: most likely a syntax error20:58
flu-I completely agree... being that I'm on aws, I don't have a way to turn up the upstart verbosity through grub. Does it log somewhere else that I could check?20:59
JanCyou can change the verbosity with initctl too21:00
flu-nice!21:03
flu-That was extremely helpful21:06
JanCoh, and it logs to syslog21:08
JanCat least in Ubuntu21:08
flu-yeah it did21:40
flu-pointed me to the offensive line21:40
JanC21:55

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