[07:38] ion: I must get around to writing crazy zsh expansion for Upstart [07:38] e.g. start not completing anything already running ;) [07:39] Yeah :-) [07:41] but first I should probably write more of Upstart [13:46] hi all! [13:47] I have read the getting started page http://upstart.ubuntu.com/getting-started.html but I have a question for which I can't seem to find an answer on the site. [13:47] Are there any special characteristics required for a script that is run by Upstart [13:47] ? [13:49] I have a 'traditional' service script that forks to the background and I tried many different methods inclusing using states... But I can't get it to start [13:49] *including [13:50] running the script from command line works fine [20:00] Hi all. Any idea why a simple job like this: http://pastebin.com/Q6mkJzzw doesn't work? [20:05] shan3: looks like it would need the task keyword, since the script exits. [20:06] * shan3 google task keyword [20:07] man 5 init is the docs [20:08] sadmac: what about using the 'service' option and having a pre-start script instead... ? [20:09] http://wiki.frugalware.org/index.php/Upstart_Job_HOWTO < says we can do that instead of script or exec [20:11] shan3: oh, for what it looks like you want to do that's right [20:12] shan3: except no service option if you're using the latest version [20:13] sadmac: hm... if I use pre-start script, upstart doesn't even recognize my job as a job... [20:13] shan3: what version of upstart is this? [20:14] the one in Ubuntu 10.04 RC [20:14] 0.6.5 [20:14] A typo or invalid syntax somewhere? [20:15] let me try again using pre-start script without the service option... [20:15] that's about all I've been changing [20:17] shan3: the service option is no longer supported [20:17] shan3: its bad syntax [20:20] Hm... so then what is the right way to run a script that exits in a job?... [20:21] Make it a pre-start/post-start script or make the job a task by using the ‘task’ stanza. [20:22] ion: Thanks... I'll have to read the latest docs... seems like I've been reading outdated ones and pulling my hair out. [20:24] init(5) as sadmac said. [20:25] yup... got it. [20:31] woah, it exists! [20:31] LzrdKing: yes. welcome to the pocket dimension of xindu [20:32] oh, i musty be on the worng place [20:32] woah, typos galore! [20:32] i must be in the wrong place* [20:33] how can i use upstart to bring up my wireless as soon as wlan0 is visible to the kernel? [20:33] LzrdKing: you need to have udev run initctl emit something so you get an event when that happens [20:34] how do i get udev to do that? [20:34] LzrdKing: ask in #udev :) [20:34] LzrdKing: depending on your distro maybe something of the kind is already set up [20:35] SUBSYSTEM=="net", RUN+="/sbin/initctl emit ..." [20:35] i don't think so, as much as i've tried, i can't get wlan0 up before a mountall happens, whch tries to mount nfs shares [20:36] nfs + wireless + boot-essential = cry [20:36] so i can have udev emit anything that the upstart sctips then looks for? [20:36] scripts* [20:36] LzrdKing: indeed. [20:37] if you have mountall, it sounds like you're running Ubuntu [20:38] so if it emits "wirelessnetworkvisible" then the upstart script should have "start on wirelessnetworkvisible"? [20:38] Keybuk: yes, karmic [20:38] then you will already have events from udev [20:38] e.g. net-device-added wlan0 [20:38] which will already run "ifup wlan0" if you have wlan0 configured in /etc/network/interfaces [20:39] i do, but that mountall comes along to early [20:40] shouldn't udev emit that event before anything in rcS.d/ is run? [20:40] LzrdKing: you may be able to add "and net-device-up wlan0" to mountall's start conditions. Maybe. [20:41] i need the "and" for mutliple requirements? [20:42] LzrdKing: yes, but the "and" has some quirks and surprises [20:42] like what? [20:44] LzrdKing: if you have a job that says start on starting foo and bar, foo will get stuck in the starting state until bar comes along, because its starting event won't get retired until that condition is met, even though its in another job. [20:45] maybe i'll just take my nfs shares out of fstab and mount them manually in rc.local... [20:45] LzrdKing: or make them noauto in fstab and mount them in rc.local === Keybuk changed the topic of #upstart to: Upstart 0.6.6 "No, she's dead, this is her son" | http://upstart.ubuntu.com/ [20:47] * sadmac counts the minutes until someone who barely speaks english and whom he's never seen before or will see again files a Fedora bug suggesting we update the Upstart package without articulating any particular need for it. [20:48] new version? [20:49] yeah, nothing really important in it - just wanted to flush it out [20:49] main reason is that whatever gettext I used for 0.6.3+0.6.5 had files generated against the GPLv3 version of Bison [20:49] sadmac: if i use noauto then mount -a won't mount it? [20:50] LzrdKing: yes [20:50] Keybuk: terrible [20:51] sadmac: have you tired to get wireless+nfs up at boot time before? [20:52] LzrdKing: no. I also don't use Ubuntu :) but I don't think the maintainers of any of those components are expecting to work with oneanother [20:52] sadmac: you said it was "cry" [20:52] so i thought you tried and failed miserably, as i am [20:53] LzrdKing: I'm crying at the idea. [20:54] it really shouldn;t be that hard, i mean, all i need to do to bring up wlan0 is "iwconfig wlan0 essid myESSID; dhclient wlano" [20:54] oops, wlan0 [20:55] LzrdKing: did you add it to /etc/network/interfaces ? [20:55] Keybuk: yeah i did [20:56] that's all you should need to do [20:56] it didn't seem to make any change [20:56] plus i have the iwconfig/dhclient command isn a script, plus i installed wicd [20:56] s/isn/in [20:57] startup scripts need to be organized better [20:57] so people can figure out whats going on [20:57] Keybuk: what's the new codename from? [21:00] rc#.d/ was easy to understand, upstart is hard [21:10] rc#.d was full of race conditions and ugly workarounds that may or may not have worked. [21:10] but i understood what was happening [21:11] i will understand upstart, eventually [21:11] messaging is wierd, things become so loosely connected now [21:41] in the past things weren't connected at all ;) [21:43] sure they were, program a called program b [21:43] but that was it [21:43] yes, you knew that for a program to be started after networking was up, it had to be replaced with a number "higher than 40" in "runlevel 2" [21:43] in Ubuntu [21:43] but in Debian that had to be "higher than 35" in "runlevel S" [21:43] and in Fedora that had to be "any value" in "runlevel 3 or 5" [21:43] etc. [21:44] but it was easy to look at the directory listings and link your script into an existing runlevel startup [21:46] I think there are some plans to make it possible to map what was started by what [21:47] i just need to learn the new system, then i'll say, boy that sysv crap sure was backwards [22:57] Is it possible to use bash instead of sh for upstart jobs? [23:19] exec /path/to/bash-script