gokulnath | Hello, this is my upstart script -->> http://pastie.org/2389884 | 05:38 |
---|---|---|
gokulnath | But when I rebooted the machine the process was not started | 05:38 |
samarama | hi | 08:05 |
samarama | how can i find out whether my system already uses upstart or not? | 08:05 |
jhunt | what does "which initctl" return? | 08:06 |
jhunt | actually "ls /sbin/initctl" is safer | 08:06 |
samarama | i dont know wheter my system uses sysvinit or upstart. is there a way to find out? | 08:08 |
jhunt | If you have initctl installed, you are more than likely using upstart. | 08:08 |
jhunt | what O/S is it? | 08:09 |
samarama | ubuntu 10.04 lts | 08:09 |
jhunt | you're using upstart then :) | 08:09 |
samarama | ok. 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 |
pmjdebruijn | samarama: dpkg -l upstart ? | 08:11 |
pmjdebruijn | though that just checks if it's installed, not if it's actually being used | 08:13 |
jhunt | the problem isn't detecting upstart, it's detecting that the system *isn't* upstart. | 08:13 |
jhunt | Upstart supports "/sbin/init --version" | 08:13 |
jhunt | ... but that will do bad things on some SysV systems as they might ignore "--version". | 08:14 |
jhunt | you 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 |
jhunt | not 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 upstart | 17:06 |
flu- | so I guess a related question is, can I have arbitrary script stanzas that file on particular events? | 17:06 |
JanC | flu-: do you mean that you want other actions than start & stop? | 17:29 |
flu- | correct | 17:30 |
flu- | To put it in concrete terms, my existing /etc/init.d service templates respond to start, stop, restart, start-profiler and start-foreground | 17:30 |
flu- | the latter two used for diagnosing issues with the service | 17:30 |
JanC | one thing you could do is make a second job that starts the service with profiling | 17:31 |
flu- | and perhaps stop any existing instance before starting? | 17:31 |
JanC | or you could use arguments to enable profiling | 17:32 |
flu- | I think I like the argument approach | 17:37 |
flu- | I could then test if some environment variable is set in my script stanza, correct? | 17:37 |
JanC | yes | 17:37 |
flu- | nice. Think this will work just fine, thanks for the help JanC | 17:43 |
pmjdebruijn | hi again | 18:33 |
pmjdebruijn | does anybody here know if there an easy way to _safely_ delay the tty's | 18:33 |
pmjdebruijn | I rather wouldn't depend them on something else (and risk not getting them at all because of an unsatisfied dependancy) | 18:34 |
pmjdebruijn | part 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 |
pmjdebruijn | often a tty pops up with localhost still | 18:34 |
pmjdebruijn | I wouldn't mean just delaying them 60 seconds or so | 18: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 |
JanC | flu-: most likely a syntax error | 20: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 |
JanC | you can change the verbosity with initctl too | 21:00 |
flu- | nice! | 21:03 |
flu- | That was extremely helpful | 21:06 |
JanC | oh, and it logs to syslog | 21:08 |
JanC | at least in Ubuntu | 21:08 |
flu- | yeah it did | 21:40 |
flu- | pointed me to the offensive line | 21:40 |
JanC | ☺ | 21:55 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!