[04:02] how can I get upstart to log all output to a file? [09:00] I'm searching for a way to disable upstart jobs via a command, is this possible? [14:45] Anyone know a method to run a upstart job as another user and still have it run with an exec command in the .conf file? [14:48] When ever I try to pass the username to run it as it then gets interpreted by the shell and then running status tells me it is not running, but ps -C shows it is running. [18:10] frederickjh: what do you use to run it as a certain user? [18:11] and the difference between status & ps is probably because you need another 'expect' stanza in the job file [18:43] JanC I am using sudo -u username command to run the job. [18:44] What is a 'expect' stanza? Where do I find more info about it, JanC? [18:44] I have not come across that command in any of the upstart docs/info I have found. [18:45] it's in the manual page [18:46] init(5) manpage [18:46] ok [18:46] I will check it out. [18:46] so, run 'man 5 init' [18:46] why the 5? [18:46] why not man init ? [18:48] because there are manpages for init in more than 1 category [18:48] I see it brings up a different man page. [18:48] see 'man man' for more info about these categories [18:48] ok [18:48] thansk [18:48] thanks! [18:49] e.g. 5 is for file format description [18:49] ok [18:51] ok I am using expect fork now that I reread my job maybe in need expect daemon as that is what the processes are. [18:51] frederickjh: if you look at the default 'man init', you'll see init(8) at the top right, meaning that one is in section 8, and at the bottom it lists init(5) in the SEE ALSO list [18:52] ok [18:52] might be useful for other programs in the future ☺ [18:55] yes [18:56] one other question. Right now I am specifying the username in the command but I would like to some how pass it to the command without a variable. [18:57] As, when I use a variable it get interpreted by the shell and the status never shows it running, but maybe the expect daemon will fix that. [18:57] what does "stop on runlevel" mean in a job? My upstart isn't running rc-sysinit properly and as such anything depending on runlevel or any old style sysvinit scripts aren't executed. [19:00] runing Ubuntu 10.04 [19:02] "stop on runlevel 5" will stop a job when the "runlevel 5" event is emitted (by telinit, normally) [19:03] I know but what is "stop on runlevel" with no number [19:04] I don't think that's supposed to make sense [19:05] "stop on runlevel" is in my rc-sysinit.conf job [19:06] right [19:06] so thats not the problem? [19:06] no [19:07] Dang! [19:07] Thought I was close [19:07] anyway to debug what upstart has done? initctl list doesnt return anything [19:08] It stops the job on any runlevel event. [19:09] so basically when it's done it's job stop. Makes sense. But I am never getting the telinit 2 that should be running (or if I am it's not being registered) [19:10] https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/543506 perhaps [19:15] sorta Looks similar but they are all getting output from initctl list where I get nothing [19:17] Huh. That’s strange. [19:17] What does, say, ‘status rc’ output? [19:18] mediapc-desktop.root ~: initctl list [19:18] mediapc-desktop.root ~: status rc [19:18] mediapc-desktop.root ~: return 1 [19:18] mediapc-desktop.root ~: 1 [19:19] if you see there is a 1 to the right of the last line, thats the error code. I am getting no output AND no error codes [19:21] echo foo; >&2 echo bar [19:25] mediapc-desktop.root ~: echo foo; >&2 echo bar 1 [19:25] foo [19:25] bar [19:31] Should I be posting a bug report? [19:33] Please run ‘strace -o strace.initctl status rc’ first and share strace.initctl via a pastebin or equivalent. [19:38] I dont need pastebin, nothing is returned [19:40] strace.initctl is empty? [19:44] ah my bad, it's output to a file, my apologies [19:49] compare "status rc" as a user and as root? [20:28] Sorry for delay, something came up. http://pastebin.com/UTuYdNYg [20:29] mediapc-desktop.root ~: status rc [20:29] mediapc-desktop.root ~: exit [20:29] mediapc-desktop.kasuko ~: status rc [20:29] mediapc-desktop.kasuko ~: [20:29] no difference [20:54] anything? [21:23] no idea, your strace makes it look like an empty executable [21:24] kasuko: What distro are you running? [21:26] anything? ubuntu 10q.04 [21:26] oops sorry about thee repeat [21:27] status --help ? [21:29] Please pastebin the output of apt-cache policy upstart; md5sum /sbin/initctl; grep sbin/initctl /var/lib/dpkg/info/upstart.md5sums [21:32] status --help displays the standard help output [21:34] http://pastebin.com/4TKeWN6X [21:34] they aren't the same [21:37] but I have tried apt-get install --reinstall upstart earlier today [21:37] ls -l /sbin/initctl; file /sbin/initctl; dpkg-divert --list '*initctl*' [21:38] lrwxrwxrwx 1 root root 9 2010-05-12 21:34 /sbin/initctl -> /bin/true [21:38] /sbin/initctl: symbolic link to `/bin/true' [21:38] local diversion of /sbin/initctl to /sbin/initctl.distrib [21:38] are you kidding me? [21:39] wtf [21:40] ya running initctl.distrib list gives me the proper output [21:41] so why would that happen? [21:42] Good question [21:43] keybuk: I take it upstart maintscripts have never done any diversions in the past? [21:45] nope [21:45] people do it in chroots [21:45] for fun, profit, and to take over the world [21:48] This isn't a chroot though, nor am I in it for profits or taking over the world ... but that would be nice [21:49] kasuko: I take it you’re the only one with root access to the box? :-) [21:49] Yes [21:49] Why, should I be worried? [21:50] maybe I'm not the only one with root access anymore :S [21:50] seems an odd thing to do [21:52] There are no erroneus users and I never changed the root password from randomly generated [21:52] I’m out of ideas for now. [21:53] I'm just more curious if I should be reporting it as a bug somewhere or if it was a one time thing [21:53] debootstrap does it, but it usually undoes it [21:53] bug where? until you know what made the diversion, nowhere to file the bug [21:53] unless we can file "something strange is afoot" bugs on the universe? [21:53] for example [21:53] [21:54] What were you doing on, or around, the 12th of May at approximately 9.34 pee emm ? [21:54] True, well I just linked initctl to initctl.distrib but that just solves the list. Now I am going to try the work around from that bug report [21:57] The proper way to remove the diversion is dpkg-divert --rename --remove /sbin/initctl [22:01] Running the two commands listed in https://wiki.ubuntu.com/LucidLynx/ReleaseNotes#Upstart%20jobs%20cannot%20be%20run%20in%20a%20chroot would result precisely in what your system has. How that has ended up happening is unclear. [22:08] how can I get upstart to log all output to a file? [22:09] it logs to syslog by default [22:10] there is no syslog on this machine [22:10] in that case, it logs to the console [22:10] I know that. It scrolls by too fast to read. [22:10] that's why I need it in a file [22:13] so install syslog [22:13] or something that captures the console output [22:15] I've found it basically impossible to capture console output since Upstart reopens /dev/console [22:15] rather than using the stdin/out it inherits from pre-init [22:16] sure you can [22:16] e.g. bootlogd [22:18] any idea where i can get bootlogd? :/ [22:21] I can confrim that the work around in 543506 fixed the other issue. Thank you [22:23] found one, but bootlogd seems to require CONFIG_LEGACY_PTY, which I cannot provide it... (or can I?)