From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RxzhM-0003ds-LQ for garchives@archives.gentoo.org; Thu, 16 Feb 2012 11:40:28 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BC0FAE0D39; Thu, 16 Feb 2012 11:40:19 +0000 (UTC) Received: from svr-us4.tirtonadi.com (svr-us4.tirtonadi.com [69.65.43.212]) by pigeon.gentoo.org (Postfix) with ESMTP id 2ACCBE0903 for ; Thu, 16 Feb 2012 11:39:21 +0000 (UTC) Received: from mail-lpp01m010-f53.google.com ([209.85.215.53]) by svr-us4.tirtonadi.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.69) (envelope-from ) id 1RxzgI-003at5-8Z for gentoo-user@lists.gentoo.org; Thu, 16 Feb 2012 18:39:22 +0700 Received: by lahd3 with SMTP id d3so2592041lah.40 for ; Thu, 16 Feb 2012 03:39:16 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.152.128.163 with SMTP id np3mr1449994lab.51.1329392356868; Thu, 16 Feb 2012 03:39:16 -0800 (PST) Received: by 10.112.38.194 with HTTP; Thu, 16 Feb 2012 03:39:16 -0800 (PST) Received: by 10.112.38.194 with HTTP; Thu, 16 Feb 2012 03:39:16 -0800 (PST) In-Reply-To: <4F3CE471.6070606@binarywings.net> References: <53f772f8762eb4f7a7a41072e795a3ba.squirrel@www.antarean.org> <4F3CE471.6070606@binarywings.net> Date: Thu, 16 Feb 2012 18:39:16 +0700 Message-ID: Subject: Re: [gentoo-user] Can no longer use symlinks in /etc/init.d with openrc-0.9.8.4 ? From: Pandu Poluan To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=f46d042c6b7332c10704b9134788 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - svr-us4.tirtonadi.com X-AntiAbuse: Original Domain - lists.gentoo.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - poluan.info X-Archives-Salt: afd5296d-22ef-4a69-b3b7-80adcfa80fc4 X-Archives-Hash: 5ab74ae88952ab2213dbe5b98597134e --f46d042c6b7332c10704b9134788 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Feb 16, 2012 6:14 PM, "Florian Philipp" wrote: > > Am 16.02.2012 11:12, schrieb Pandu Poluan: > > > > On Feb 16, 2012 3:33 PM, "J. Roeleveld" > > wrote: > >> > >> > >> On Thu, February 16, 2012 6:24 am, Pandu Poluan wrote: > >> > I am wondering if any of you had experienced the same difficulty as me: > >> > > >> > A couple of days ago, I upgraded openrc from (whatever version it wa= s > >> > previously) to 0.9.8.4. > >> > > >> > One of the scripts in /etc/init.d was a symlink to > > /opt/some/package/path > >> > > >> > (To be precise, /etc/init.d/gatewall -> > >> > /opt/wallmator/initscripts/gentoo/gatewall.init) > >> > > >> > ((wallmator is a "Firewall Automator" script I'm developing)) > >> > > >> > This morning, I rebooted. Upon time to execute the "gatewall" script= , > >> > it complained that some settings (set through /etc/conf.d/gatewall are > >> > not set). I double-checked the settings it complained; yep, they are > >> > there in /etc/conf.d/gatewall. > >> > > >> > I tried `/etc/init.d/gatewall start`, no luck. It still complains of > >> > some vital non-optional settings not being set. > >> > > >> > So, I replaced the symlink: > >> > > >> > cd /etc/init.d > >> > mv gatewall gatewall.old > >> > cp /opt/wallmator/initscripts/gentoo/gatewall.init gatewall > >> > > >> > And tried again `/etc/init.d/gatewall start` ... it worked!! > >> > > >> > So I tried `shutdown -r now` ... there's joy in Mudville! The > >> > "gatewall" initscript now properly reads the settings in > >> > /etc/conf.d/gatewall. > >> > > >> > My question is: Is there a change of behavior in how openrc executes a > >> > script in /etc/init.d/ when said script is a symlink instead of a > >> > 'normal' file? > >> > > >> > PS: For this particular system, everything under / except /boot > >> > resides in the same filesystem. > >> > > >> > PPS: For the contents of the "gatewall" initscript, see > >> > > > https://bitbucket.org/pepoluan/wallmator/src/edae2e294d07/initscript/gentoo= /gatewall.init > >> > > >> > Rgds, > >> > -- > >> > FdS Pandu E Poluan > >> > ~ IT Optimizer ~ > >> > > >> > =C3=82 =C3=A2=E2=82=AC=C2=A2 LOPSA Member #15248 > >> > =C3=82 =C3=A2=E2=82=AC=C2=A2 Blog : http://pepoluan.tumblr.com > >> > =C3=82 =C3=A2=E2=82=AC=C2=A2 Linked-In : http://id.linkedin.com/in/p= epoluan > >> > > >> > >> Pandu, > >> > >> I haven't checked the source yet, but I'm wondering if the scripts are > >> looking for the "conf.d" file in the location: > >> " ../conf.d " (based from the actual location of the init-script) > >> > >> Can you try the following: > >> # mkdir -p /opt/wallmator/initscripts/conf.d > >> # ln -s /etc/init.d/gatewall /opt/wallmator/initscripts/conf.d/gatewal= l > >> > >> and then recreate the original link for the init-script. > >> > > > > IIRC, it's the responsibility of runscript to source the relevant confi= g > > file in /etc/conf.d, and not the initscript's. > > > > If you peruse the code, you can see that I relied on that feature; ther= e > > is no source-ing of any file in /etc/conf.d > > > > Rgds, > > > > Yes, but maybe runscript resolves the real file location and then > sources the conf file relative to that location. > Most likely. Didn't use to be like that, though. Oh well, I'll just add an explicit source then. Rgds, --f46d042c6b7332c10704b9134788 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Feb 16, 2012 6:14 PM, "Florian Philipp" <lists@binarywings.net> wrote:
>
> Am 16.02.2012 11:12, schrieb Pandu Poluan:
> >
> > On Feb 16, 2012 3:33 PM, "J. Roeleveld" <joost@antarean.org
> > <mailto:joost@antarean.o= rg>> wrote:
> >>
> >>
> >> On Thu, February 16, 2012 6:24 am, Pandu Poluan wrote:
> >> > I am wondering if any of you had experienced the same di= fficulty as me:
> >> >
> >> > A couple of days ago, I upgraded openrc from (whatever v= ersion it was
> >> > previously) to 0.9.8.4.
> >> >
> >> > One of the scripts in /etc/init.d was a symlink to
> > /opt/some/package/path
> >> >
> >> > (To be precise, /etc/init.d/gatewall ->
> >> > /opt/wallmator/initscripts/gentoo/gatewall.init)
> >> >
> >> > ((wallmator is a "Firewall Automator" script I= 'm developing))
> >> >
> >> > This morning, I rebooted. Upon time to execute the "= ;gatewall" script,
> >> > it complained that some settings (set through /etc/conf.= d/gatewall are
> >> > not set). I double-checked the settings it complained; y= ep, they are
> >> > there in /etc/conf.d/gatewall.
> >> >
> >> > I tried `/etc/init.d/gatewall start`, no luck. It still = complains of
> >> > some vital non-optional settings not being set.
> >> >
> >> > So, I replaced the symlink:
> >> >
> >> > cd /etc/init.d
> >> > mv gatewall gatewall.old
> >> > cp /opt/wallmator/initscripts/gentoo/gatewall.init gatew= all
> >> >
> >> > And tried again `/etc/init.d/gatewall start` ... it work= ed!!
> >> >
> >> > So I tried `shutdown -r now` ... there's joy in Mudv= ille! The
> >> > "gatewall" initscript now properly reads the s= ettings in
> >> > /etc/conf.d/gatewall.
> >> >
> >> > My question is: Is there a change of behavior in how ope= nrc executes a
> >> > script in /etc/init.d/ when said script is a symlink ins= tead of a
> >> > 'normal' file?
> >> >
> >> > PS: For this particular system, everything under / excep= t /boot
> >> > resides in the same filesystem.
> >> >
> >> > PPS: For the contents of the "gatewall" initsc= ript, see
> >> >
> > https://bitbucket.org/pepoluan/wallmat= or/src/edae2e294d07/initscript/gentoo/gatewall.init
> >> >
> >> > Rgds,
> >> > --
> >> > FdS Pandu E Poluan
> >> > ~ IT Optimizer ~
> >> >
> >> > =C3=82 =C3=A2=E2=82=AC=C2=A2 LOPSA Member #15248
> >> > =C3=82 =C3=A2=E2=82=AC=C2=A2 Blog : http://pepoluan.tumblr.com
> >> > =C3=82 =C3=A2=E2=82=AC=C2=A2 Linked-In : http://id.linkedin.com/in/pepoluan
> >> >
> >>
> >> Pandu,
> >>
> >> I haven't checked the source yet, but I'm wondering i= f the scripts are
> >> looking for the "conf.d" file in the location:
> >> " ../conf.d " (based from the actual location of th= e init-script)
> >>
> >> Can you try the following:
> >> # mkdir -p /opt/wallmator/initscripts/conf.d
> >> # ln -s /etc/init.d/gatewall /opt/wallmator/initscripts/conf.= d/gatewall
> >>
> >> and then recreate the original link for the init-script.
> >>
> >
> > IIRC, it's the responsibility of runscript to source the rele= vant config
> > file in /etc/conf.d, and not the initscript's.
> >
> > If you peruse the code, you can see that I relied on that feature= ; there
> > is no source-ing of any file in /etc/conf.d
> >
> > Rgds,
> >
>
> Yes, but maybe runscript resolves the real file location and then
> sources the conf file relative to that location.
>

Most likely. Didn't use to be like that, though.

Oh well, I'll just add an explicit source then.

Rgds,

--f46d042c6b7332c10704b9134788--