/srv/irclogs.ubuntu.com/2012/05/11/#upstart.txt

nirvdrumHi.  I'm trying to start up a job using setuid, but I need that to work as if it were a login shell.  I.e., I need the unprivileged user's environment setup through the files in /etc/profile.d/  Is that doable?01:20
mattbillensteinhi all02:25
mattbillensteinhow do I clear the state for a stuck job?02:25
mattbillensteinstatus says my job is start/killed with a pid02:26
mattbillensteinbut that pid doesn't exist02:26
mattbillensteinso stop just hangs02:26
mattbillensteinand start thinks it's already running02:26
mattbillensteinlike, does upstart store this state somewhere?02:28
mattbillensteinanyone around?02:47
etanki am having an issue with the order that daemons are starting in 12.04 i think12:56
etankwe use nis + autofs and i think that ypbind is trying to start before network-manager is up12:56
etankypbind shows that it is running after a boot but ypwhich says "Can't communicate with ypbind"12:57
etankautofs is also running and it shows a pid12:57
etankypbind however does not list a pid12:58
etankthe only thing i can do to get the system working after a boot is to issue a "service ypbind restart; service autofs restart"12:59
etankis there a more upstart'ish way of doing this so i dont have to do it manually or add a sleep to rc.local?13:00
JanCetank: are ypbind & autofs upstart jobs or sysvinit scripts?13:53
JanCseems like they are sysvinit scripts?13:56
etankthey are upstart jobs it seems13:57
etankthey link to /lib/init/upstart-job13:57
etankthey being start-ypbind, ypbind, network-manager  and autofs13:57
JanCif there is an /etc/init/autofs etc. then they are upstart jobs indeed13:58
etankthere are13:58
etankit seems that ypbind is starting too soon13:58
etanknetwork seems to not be up when ypbind is trying to start13:59
etankshould be network-manager -> ypbind -> autofs13:59
JanCnetwork-manager being started doesn't mean network is up14:00
JanCthere are events when network comes up though14:00
JanCnet-device-up14:02
etankok14:03
etankupstart is all new to me14:03
JanCso I guess those upstart jobs should wait for those events14:03
etanknet-device-up needs to happen for non loop back interfaces14:04
etankthen ypbind can start since it can contact the ypservers14:04
etankthen autofs can start since nsswitch says to talk to nis for automounts14:04
etankyou could substitute ldap in for ypbind for systems that authenticate to ldap i guess but the idea would be the same14:05
JanCetank: maybe there are more people in #ubuntu-server who are familiar with this particular type of setup14:06
etanknetwork-manager.conf does not have a emit statement for net-device-up14:07
etanki will ask in ubuntu-server as welll14:07
JanCthe "emit" stanza is just documentation anyway14:08
JanCand I think the actual events might be emitted by another job or maybe upstart-udev-bridge -- see upstart-events(7) 14:13
TelenullHello everyone. Is there a way to exec as an unprivileged user from an upstart? I've tried a few things that show up on superuser (using su -s and sudo -u, but they all cause it to start as root still). any ideas?21:24
SpamapSTelenull: two ways actually :)22:04
Telenull:P I ended up getting it working with sudo.22:04
SpamapSTelenull: if you have upstart 1.5 (Ubuntu 12.04 basically) then you can use 'setuid' and 'setgid' as keywords22:04
Telenulloh neat.22:05
SpamapSTelenull: otherwise sudo or start-stop-daemon work22:05
Telenullunfortunately i'm still on 10.04.22:05
Telenullthe update to 12.04 will happen for me in about three months.22:05
SpamapSTelenull: there are some ideas in http://upstart.ubuntu.com/cookbook/22:05
TelenullThanks for the info though!22:05
TelenullAwesome, thanks.22:05
wookienzmorning any knowledgeable folk around?23:57

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