Re: Bug#545691: diverting telinit

2009-10-27 Thread Manoj Srivastava
On Tue, Oct 27 2009, Steve Langasek wrote: > On Tue, Oct 27, 2009 at 08:17:08AM -0500, Manoj Srivastava wrote: > >> >> Not needed. If init has been just upgraded, it has been already >> >> told to init -u itself. > >> > This does not appear to be true for upstart, which it's planned to sw

Re: Bug#545691: diverting telinit

2009-10-27 Thread brian m. carlson
On Mon, Oct 26, 2009 at 10:56:16PM -0700, Steve Langasek wrote: > Huh, isn't that an FHS violation? /dev/initctl isn't much better, but seems > to be covered by "special files"; upstart doesn't use either of these > locations, fwiw. I think the issue came down to the fact that with kFreeBSD, /dev

Re: Bug#545691: diverting telinit

2009-10-27 Thread Steve Langasek
On Tue, Oct 27, 2009 at 08:17:08AM -0500, Manoj Srivastava wrote: > >> Not needed. If init has been just upgraded, it has been already > >> told to init -u itself. > > This does not appear to be true for upstart, which it's planned to switch to > > on Linux for squeeze. > Well,

Re: Bug#545691: diverting telinit

2009-10-27 Thread Goswin von Brederlow
Manoj Srivastava writes: > On Fri, Oct 23 2009, Bernd Eckenfels wrote: > >> In article <87r5sudn0p.fsf...@anzu.internal.golden-gryphon.com> you wrote: >>> [ "$(stat -c %d/%i /sbin/init)" = "$(stat -Lc %d/%i /proc/1/exe >>> 2>/dev/null)" ] ; then >>> # So, init exists, and there is a linu

Re: Bug#545691: diverting telinit

2009-10-27 Thread Manoj Srivastava
On Tue, Oct 27 2009, Bernd Eckenfels wrote: > In article <873a59ens7@anzu.internal.golden-gryphon.com> you wrote: >>> Maybe another check besides inode idendity is better, otherwise it will not >>> be able to be used afer an upgrade (and before reboot), or? >> >>Not needed. If init ha

Re: Bug#545691: diverting telinit

2009-10-27 Thread Manoj Srivastava
On Tue, Oct 27 2009, Steve Langasek wrote: > On Fri, Oct 23, 2009 at 05:41:28PM -0500, Manoj Srivastava wrote: >> > In article <87r5sudn0p.fsf...@anzu.internal.golden-gryphon.com> you wrote: >> >> [ "$(stat -c %d/%i /sbin/init)" = "$(stat -Lc %d/%i /proc/1/exe >> >> 2>/dev/null)" ] ; then >>

Re: Bug#545691: diverting telinit

2009-10-27 Thread Bernd Eckenfels
In article <873a59ens7@anzu.internal.golden-gryphon.com> you wrote: >> Maybe another check besides inode idendity is better, otherwise it will not >> be able to be used afer an upgrade (and before reboot), or? > >Not needed. If init has been just upgraded, it has been already > told to

Re: Bug#545691: diverting telinit

2009-10-26 Thread Steve Langasek
On Fri, Oct 23, 2009 at 06:43:32PM +, brian m. carlson wrote: > Last I checked, the kfreebsd-* architectures don't use /dev/initctl; I > think it's something like /etc/.initctl. They do, however, have a > linuxy proc. You should probably check with the porters as to what > location is appropr

Re: Bug#545691: diverting telinit

2009-10-26 Thread Steve Langasek
On Fri, Oct 23, 2009 at 05:41:28PM -0500, Manoj Srivastava wrote: > > In article <87r5sudn0p.fsf...@anzu.internal.golden-gryphon.com> you wrote: > >> [ "$(stat -c %d/%i /sbin/init)" = "$(stat -Lc %d/%i /proc/1/exe > >> 2>/dev/null)" ] ; then > >> # So, init exists, and there is a linuxy /p

Re: Bug#545691: diverting telinit

2009-10-26 Thread Russell Coker
On Tue, 27 Oct 2009, Bastian Blank wrote: > >         Which is why currently, as I  have said before, re-execing init > >  is opportunistic.  This may or may not be the case in the future. > > No. It is not. All the re-exec init calles are only to start it with > new libs and there is no change vi

Re: Bug#545691: diverting telinit

2009-10-26 Thread Bastian Blank
On Mon, Oct 26, 2009 at 01:28:33PM -0500, Manoj Srivastava wrote: > On Mon, Oct 26 2009, Bastian Blank wrote: > > Policy is not coupled with init or the libs. This is a problem between > > the kernel and the policy tools. > This is not totally true: init loads the initial policy, and > tha

Re: Bug#545691: diverting telinit

2009-10-26 Thread Manoj Srivastava
On Mon, Oct 26 2009, Bastian Blank wrote: > Policy is not coupled with init or the libs. This is a problem between > the kernel and the policy tools. This is not totally true: init loads the initial policy, and that means that linking with new versions of selinux libs makes a difference

Re: Bug#545691: diverting telinit

2009-10-26 Thread Bastian Blank
On Mon, Oct 26, 2009 at 07:23:12AM -0500, Manoj Srivastava wrote: > On Mon, Oct 26 2009, Bastian Blank wrote: > > Oh, and this could be made even easier by defining file-based triggers > > in the package providing init instead of doing it in all the > > dependencies. > In which case it defi

Re: Bug#545691: diverting telinit

2009-10-26 Thread Bastian Blank
On Mon, Oct 26, 2009 at 11:22:35AM -0500, Manoj Srivastava wrote: > On Mon, Oct 26 2009, Bastian Blank wrote: > > > On Mon, Oct 26, 2009 at 07:21:31AM -0500, Manoj Srivastava wrote: > >> On Mon, Oct 26 2009, Bastian Blank wrote: > >> > Why are they not able to ignore the errors from telinit? All c

Re: Bug#545691: diverting telinit

2009-10-26 Thread Bill Allombert
On Mon, Oct 26, 2009 at 07:23:12AM -0500, Manoj Srivastava wrote: > On Mon, Oct 26 2009, Bastian Blank wrote: > > > On Mon, Oct 26, 2009 at 10:40:56AM +0100, Bastian Blank wrote: > >> On Fri, Oct 23, 2009 at 12:43:18PM -0500, Manoj Srivastava wrote: > >> > I created a elaborate test case t

Re: Bug#545691: diverting telinit

2009-10-26 Thread Manoj Srivastava
On Mon, Oct 26 2009, Bastian Blank wrote: > On Mon, Oct 26, 2009 at 07:21:31AM -0500, Manoj Srivastava wrote: >> On Mon, Oct 26 2009, Bastian Blank wrote: >> > Why are they not able to ignore the errors from telinit? All checked >> > packages uses this to ask init to reexecute itself and free old

Re: Bug#545691: diverting telinit

2009-10-26 Thread Bastian Blank
On Mon, Oct 26, 2009 at 07:21:31AM -0500, Manoj Srivastava wrote: > On Mon, Oct 26 2009, Bastian Blank wrote: > > Why are they not able to ignore the errors from telinit? All checked > > packages uses this to ask init to reexecute itself and free old library > > references. Nothing in this is criti

Re: Bug#545691: diverting telinit

2009-10-26 Thread Manoj Srivastava
On Mon, Oct 26 2009, Bastian Blank wrote: > On Fri, Oct 23, 2009 at 12:43:18PM -0500, Manoj Srivastava wrote: >> I created a elaborate test case tos ee if we are in a chroot, if >> not if /proc/1 is actually /sbin/init, and that telinit exists (example >> below). > > Why are they not abl

Re: Bug#545691: diverting telinit

2009-10-26 Thread Manoj Srivastava
On Mon, Oct 26 2009, Bastian Blank wrote: > On Mon, Oct 26, 2009 at 10:40:56AM +0100, Bastian Blank wrote: >> On Fri, Oct 23, 2009 at 12:43:18PM -0500, Manoj Srivastava wrote: >> > I created a elaborate test case tos ee if we are in a chroot, if >> > not if /proc/1 is actually /sbin/init,

Re: Bug#545691: diverting telinit

2009-10-26 Thread Manoj Srivastava
On Mon, Oct 26 2009, Michael Biebl wrote: > Manoj Srivastava wrote: >> if [ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root >> 2>/dev/null)" ]; then > > It was brought to my attention [1], that apparently this check does > not work on GNU/Hurd as it does not provide /proc/$PID/root >

Re: Bug#545691: diverting telinit

2009-10-26 Thread Bastian Blank
On Mon, Oct 26, 2009 at 10:40:56AM +0100, Bastian Blank wrote: > On Fri, Oct 23, 2009 at 12:43:18PM -0500, Manoj Srivastava wrote: > > I created a elaborate test case tos ee if we are in a chroot, if > > not if /proc/1 is actually /sbin/init, and that telinit exists (example > > below). >

Re: Bug#545691: diverting telinit

2009-10-26 Thread Bastian Blank
On Fri, Oct 23, 2009 at 12:43:18PM -0500, Manoj Srivastava wrote: > I created a elaborate test case tos ee if we are in a chroot, if > not if /proc/1 is actually /sbin/init, and that telinit exists (example > below). Why are they not able to ignore the errors from telinit? All checked pa

Re: Bug#545691: diverting telinit

2009-10-26 Thread Michael Biebl
Manoj Srivastava wrote: > if [ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" > ]; then It was brought to my attention [1], that apparently this check does not work on GNU/Hurd as it does not provide /proc/$PID/root Cheers, Michael [1] http://bugs.debian.org/cgi-bin/bu

Re: Bug#545691: diverting telinit

2009-10-23 Thread Manoj Srivastava
On Fri, Oct 23 2009, Bernd Eckenfels wrote: > In article <87r5sudn0p.fsf...@anzu.internal.golden-gryphon.com> you wrote: >> [ "$(stat -c %d/%i /sbin/init)" = "$(stat -Lc %d/%i /proc/1/exe >> 2>/dev/null)" ] ; then >> # So, init exists, and there is a linuxy /proc, and the inode of >>

Re: Bug#545691: diverting telinit

2009-10-23 Thread Bernd Eckenfels
In article <87r5sudn0p.fsf...@anzu.internal.golden-gryphon.com> you wrote: > [ "$(stat -c %d/%i /sbin/init)" = "$(stat -Lc %d/%i /proc/1/exe > 2>/dev/null)" ] ; then > # So, init exists, and there is a linuxy /proc, and the inode of > # the executable of the process with uid 1 is the s

Re: Bug#545691: diverting telinit

2009-10-23 Thread Manoj Srivastava
On Fri, Oct 23 2009, brian m. carlson wrote: > On Fri, Oct 23, 2009 at 12:43:18PM -0500, Manoj Srivastava wrote: >> if [ -x /sbin/init ] && [ -d /proc/1 ] && >> [ "$(stat -c %d/%i /sbin/init)" = "$(stat -Lc %d/%i /proc/1/exe >> 2>/dev/null)" ] ; then >> # So, init exists, and there is

Re: Bug#545691: diverting telinit

2009-10-23 Thread brian m. carlson
On Fri, Oct 23, 2009 at 12:43:18PM -0500, Manoj Srivastava wrote: > if [ -x /sbin/init ] && [ -d /proc/1 ] && > [ "$(stat -c %d/%i /sbin/init)" = "$(stat -Lc %d/%i /proc/1/exe > 2>/dev/null)" ] ; then > # So, init exists, and there is a linuxy /proc, and the inode of > # the execut