/srv/irclogs.ubuntu.com/2011/02/22/#upstart.txt

exitdescriptionok! can anyone tell me again why there's upstart and not the usual startup scripts?07:52
exitdescriptionhi there, can anyone tell me where the upstart scripts are located?08:03
exitdescriptionokie found it08:06
exitdescriptionthanks!08:06
ralfgro_howdy!14:32
ralfgro_I'm trying to write an upstart script that needs user interaction14:32
ralfgro_it should run after network is up and before any user can log in14:33
ralfgro_so the parallel upstart boot process should wait until this script has finished14:34
ralfgro_I haven't found much on this topic14:34
mbieblralfgro_: requiring user input during boot is a bad idea14:42
ionInterface with plymouth. Its job is to multiplex user interaction for processes.14:44
ralfgro_well, the problem is that not all system are running a DM14:45
ralfgro_we want to update clients during the boot process14:45
ralfgro_but the user has the option to say no14:46
ralfgro_that'S the policy, user can discard updates one time14:46
ralfgro_and we don't have simple laptops or desktops14:47
ralfgro_some systems can't be updated after the have bootet14:47
ralfgro_so we need a way to do it right after network is up14:47
ralfgro_it's getting worse, it has to work with old sysvinit (lenny), insserv (squeeze) and upstart (ubuntu)14:48
mbieblsysvinit/insserv is basically the same14:49
ralfgro_but at the moment I'm trying to find out how it could be done with upstart14:49
ralfgro_I haven't found a way to write an upstart script that simply halts the boot process. I know that's not the goal of upstart, but is this possible?14:51
mbieblralfgro_: you can ship a sysvinit/LSB script14:51
mbieblupstart still supports sysv init scripts14:51
ralfgro_do you have a link for this?14:53
ralfgro_http://upstart.ubuntu.com/14:53
ralfgro_was not very helpful14:53
mbieblralfgro_: if you want to run it before a user can login you have a problem14:54
mbieblbecause the gdm init script triggers on the filesystem and dbus events14:54
ralfgro_I've seen that in the dgm/kdm scripts14:55
mbieblyou could block dbus from starting 14:56
mbieblby writing a job that has "start on starting dbus"14:56
ralfgro_can I emit something from an sysv scrip?14:56
ionOr just block gdm by ‘start on starting gdm’14:56
mbieblsure14:56
ralfgro_then I could add that to the start on ... part14:56
mbieblion: he would also need to block the gettys14:57
mbiebland gdm is started rather late during boot14:57
mbieblso a lot of services are already running14:57
ralfgro_I begin to think it was not the best idea to do updates while booting14:57
mbieblion: does gdm respect /etc/nologin?14:58
iondunno14:58
plautrbain fedora i would use something like 'start on starting start-ttys, console owner, task'14:58
mbiebl(looking at /etc/pam.d/nologin, it should)14:58
mbiebl/etc/pam.d/gdm, I meand14:59
ralfgro_kdm: auth       required     pam_nologin.so14:59
mbieblralfgro_: creating a file /etc/nologin should then prevent users from being able to login14:59
ralfgro_hm, but if gdm is started they don't see the dialog 15:00
ralfgro_Update now: y/n....15:00
ralfgro_this is getting complicated15:01
mbieblralfgro_: why don't you use the regular update mechanisms15:01
ralfgro_we use puppet for regular desktops/laptops15:01
mbieblso?15:01
ralfgro_but we have a lot of systems that can only be updataes before they are running15:01
mbieblexample?15:01
ralfgro_so the people that use these systems needed a special solution15:02
ralfgro_some systems are build in cars15:02
ralfgro_most of the time they are only reachable by net during boot up15:02
ralfgro_others start calculations and can't be updated during normal run time15:03
ralfgro_so need a solution that works for them15:03
mbieblso if the system is up and running it is cut of the network?15:04
ralfgro_probably15:04
mbieblI'd change my deployment to use something like fai or d-i preseeding to have up-to-date systems after installation15:05
ralfgro_the biggest chance is during boot tiem15:05
ralfgro_we install our systems with dai15:05
ralfgro_fai15:05
ralfgro_but we can't use softupdates to keep them up to date15:05
ralfgro_it is very complicated here, everything is a moving target15:06
ralfgro_after install, the systems are modified from the users (yes they have roo). and yes, it's a nightmare15:06
ralfgro_anyway, we have to find a way to install security updates15:07
mbieblI'd try the nologin + start on starting gdm approach then15:07
ralfgro_desktops/laptops get them triggered by puppert at 4am15:07
mbiebl(although it is not pretty)15:07
ralfgro_ok, I'll have a look into that15:08
mbieblyou probably need "console owner"15:08
mbieblif you use want to prompt via a shell script15:08
ionBetter to use plymouth.15:09
mbieblif they use it, yeah15:09
ralfgro_on ubuntu yes, ii  plymouth                            0.8.2-2ubuntu2.2  15:10
ralfgro_but not on debian AFAIR15:10
ralfgro_the goal should be somethin that runs on both15:11
mbieblit is not mandatory, but installable15:11
ralfgro_maybe it would be better and easier to start something right after the user logged in with *GM or console15:12
ralfgro_**DM15:12
mbieblralfgro_: it should be easier on Debian as the boot process is still linear15:12
mbieblsure, you can use a desktop autostart file for that15:13
mbieblralfgro_: just run apt-get update during boot15:15
mbieblupdate-manager should automatically prompt you if there are new updates availabe15:15
ralfgro_we don't want to use update-manager15:16
ralfgro_we need some more logging15:16
mbiebllike /var/log/dpkg.log ?15:16
ralfgro_so we will start our own script, if the user decides to install updates on his own, that's fine. but we can't relay on that15:17
ralfgro_so the user can start update-manager, but we trigger our own script15:17
mbieblI still don't understand why you want to cook up your own solution, but ok15:18
ralfgro_as I wrote above, the user have root right. which is needed because the clients are development machines etc.15:18
ralfgro_so sometime they change the sources.list15:18
mbiebli don't see a problem here15:19
ralfgro_because they don't have access to our network when the are abroud15:19
mbieblprompting during boot doesn't solve that problem15:20
ralfgro_but these sources are not reachable from the company network when they are back15:20
ralfgro_in the script we use differnt sources lists witch are fixed15:21
ralfgro_but trust me, it's compicated and we just try to do what is possible in this environment15:21
ralfgro_thanks for the pointers so far15:22
JanCwhy not have a sources list with a hostname that always resolves to a working IP depending on whether you are inside or outside the company LAN?16:02

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