=== jamescarr_ is now known as jamescarr === jamescarr_ is now known as jamescarr === muh-die-1uh is now known as muh-die-kuh [12:42] xnox: You around? [12:43] Screwba: yeap =) what's up? [12:44] xnox: you helped me the other day and stated "You mostly likely want your job to start at network-interface IFACE!=lo and before runlevel job is executed." Would my `start on` statement look like "start on started network-interface IFACE!=lo and starting rc RUNLEVEL=[2345]" [12:44] Screwba: looks right. [12:45] xnox: cool...going to give it a test by just having a script which polls for the IP and pauses for 2 mins writing the IP and timing to a /tmp/mytest.log file [12:46] xnox: I should not have to `emit` anything correct? [12:47] Screwba: nope. [12:47] xnox: just write my screwbas_event.conf file in the /etc/init folder with a script section calling my /usr/local/bin/screwbas_script [12:48] xnox: YOU ROCK !!! If this works for me, then YOU RULE !!! [12:48] ;) [13:21] xnox: it is not working for me... =( [13:22] increase debugging and see what events are emitted. [13:22] jodh: is "starting rc" ever emitted? [13:22] xnox: yes [13:24] Screwba: boot with --debug kernel arg and see what happens - e.g. order of the events. [13:24] xnox: this is my /etc/init/mytesttask.conf file http://pastebin.com/MW8657ew maybe something wrong there in my script section? [13:25] xnox: will try the --debug option now [13:25] Screwba: that should be "start on net-device-up IFACE !=lo" or "start on started network-interface INTERFACE != lo". [13:31] jodh: thanks, I will change my conf in a min and test again... =) [13:31] jodh: sorry, should it be both or one or the other? [13:35] Screwba: you should use "start on started network-interface INTERFACE!=lo and starting rc RUNLEVEL=[2345]" [13:37] jodh: testing now [13:38] xnox: I added the --debug option to Grub but it does not seem like I am getting any debug info...I made the change permanent by editing /etc/default/grub and I also removed the quiet and splash options [13:41] ... and run update-grub ? [13:42] xnox: LoL...sorry, brain fart this morning [13:42] rebooting now... [13:42] jodh: that sort of worked, I have a 1 minute pause in my /usr/local/bin/testsjy.sh script, but it appears that the script only hits about 40 secs then maybe UpStart is killing it? [13:42] jodh/xnox: testing again now... [13:45] jodh/xnox: only ran for about 35 seconds this time [13:53] jodh/xnox: New paste http://pastebin.com/9V7G4B7E [13:53] updated with my testsjy.sh script and the updated .conf file [13:54] Screwba: you need to get debug enabled. --debug gives a firehose of debug output that will get redirected by rsyslog depending on your config. [13:54] Screwba: take a look at /var/log/upstart/$your_job.log too [13:58] jodh: --debug enabled, powering off machine and rebooting in a min [13:58] jodh: there is only a .1.gz file in /var/log/upstart/mytesttask.conf and that is an old version, seems like it is not logging there [13:58] back in a bit [13:58] Screwba: your script isn't producing output then [13:59] jodh: it is only echo'ing to my /tmp/testjsy.log file, not sure if that would be output [13:59] jodh: or if I need to modify it so UpStart sees something else [14:32] i'm having some trouble with an ts3 upstart script http://pastebin.com/ijFBrZnL ...it starts the server but it gives me wrong PID ..and status ts3 shows me ts3 stop/waiting [14:32] if anyone have an idea what I do wrong please answer :) [15:10] jodh / xnox: I added a line to my script which just echo's to the console, it would appear that my script is running fully now but it does not seem to 'hold/pause' the boot sequence for the 1 minute that the script should run...does the `sleep` command work in the UpStart {script/end script} section? [15:11] jodh / xnox: I am now getting a log file in /var/log/upstart/mytesttask.log [15:59] xnox: it is not 'stopping' the boot sequence until my script finishes, I have now confirmed that. My script continues to run even after logging in. I used initctl2dot and created a graph, my script is definately dependant on network-interface and rc. [16:00] xnox / jodh: is it possible to totally pause the boot up between network-interface and rc until my script totally finishes? [16:24] Screwba: if you look at upstart-events(7), you'll see that to do that you'd need to specify "start on starting network-interface ...". The 'starting' event blocks, whereas the 'started' event does not. [16:25] jodh: ahhhhhhhh...so my start on should look like: start on starting network-interface INTERFACE!=lo [16:27] jodh: or the full string `start on starting network-interface INTERFACE!=lo and starting rc RUNLEVEL=[2345]` [16:28] Screwba: the latter I think (although I don't have the full context of what you're trying to do). [16:28] jodh: or possibly just the `start on starting network-interface` and from there, I poll to wait for an actual IP address to be assigned to the NIC, then do my work and exit 0 [16:30] jodh: I have a configuration script which I want to run on first boot up of an Ubuntu machine. The script will mount a floppy and read information from files on there, then rename the host, join it to an Active Directory domain and configure a few other things on the system. With CentOS/Red Hat it is easy because they are still using SysV init, with Ubuntu and Debian, it is harder since UpStart is the boot init [16:31] Screwba: sounds like you want to use cloud-init. That solves your problem in a generic manner: https://launchpad.net/cloud-init [16:32] jodh: xnox suggested I look at cloud-init but that is something else that I would have to teach to 'others' who may be using this. I would really like to just get it done via UpStart natively since it is there by default and everything in my configuration script uses default/built-in utilities [16:32] Screwba: cloud-init runs on centos too fwiw. [16:33] Screwba: you still didn't tell us what you want to do. And upstart spend a lot of work speeding up the boot and parallelising. Not inserting 1 minute sleeps blocking everyone =) [16:33] jodh: hmmmmmmm...I could not find any really good configuration scripts which would show the host rename and some other things. I looked at the site but the docs seem to be lacking [16:34] Screwba: maybe ping smoser then? [16:35] xnox / jodh : Thanks a lot, I will tackle the cloud-init side of things and report back. =) [16:35] jodh: I will try that as well [16:36] Screwba: do note that e.g. cloud-init runs in parallel, such that there is login prompt but cloud-init may still be running remaining parts of configuration (e.g. upgrading packages) but the generic stuff is done by that time (e.g. networking configuration & setting hostname) [16:37] Screwba: also note that cloud-init runs earlier. it specifies 'start on mounted MOUNTPOINT=/' (note that mounted also blocks - see upstart-events(7) again). [16:39] thanks guys [16:39] the biggest thing with my script is joining the AD Domain, that usually takes 2 - 5 mins using the `net ads join` command [16:40] I really need this done before the GUI login is shown [16:40] =) [16:41] Screwba: echo "start on started my-ad-task" >> /etc/init/lightdm.override [16:42] Screwba: lightdm will not come up, until my-ad-task is finished & thus no-one will be able to login. [16:43] xnox: but does that mean I need another task (/etc/init/my-ad-task.conf) created first? [16:43] Screwba: yes, that would be where you run your scripts to do AD stuff. [16:43] xnox: is there a rc.override as well? [16:44] Screwba: you can .override any .conf file [16:44] xnox: you see what I am getting at... ;-) [16:44] ahhhhhhhh... [16:44] xnox: excellent...will give it a go [16:44] Screwba: and it overlays config. It's documented in man pages & the cookbook...... [16:44] thanks again guys for your information and especially your PATIENCE with me... =) [16:44] thanks again [20:52] all: what does `instance $JOB` do? I see it but when I try to use it, I get an error when I do a `status myjob` [20:55] how does the script get the $JOB variable populated? is it internal to UpStart? === jamescarr_ is now known as jamescarr