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 1RxyL6-0001b4-R6 for garchives@archives.gentoo.org; Thu, 16 Feb 2012 10:13:25 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ADA65E0EA7; Thu, 16 Feb 2012 10:13:14 +0000 (UTC) Received: from svr-us4.tirtonadi.com (svr-us4.tirtonadi.com [69.65.43.212]) by pigeon.gentoo.org (Postfix) with ESMTP id 41C5FE0C85 for ; Thu, 16 Feb 2012 10:12:11 +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 1RxyJv-002fGT-UC for gentoo-user@lists.gentoo.org; Thu, 16 Feb 2012 17:12:12 +0700 Received: by lahd3 with SMTP id d3so2485053lah.40 for ; Thu, 16 Feb 2012 02:12:05 -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.48.69 with SMTP id j5mr1298007lan.30.1329387125900; Thu, 16 Feb 2012 02:12:05 -0800 (PST) Received: by 10.112.38.194 with HTTP; Thu, 16 Feb 2012 02:12:05 -0800 (PST) Received: by 10.112.38.194 with HTTP; Thu, 16 Feb 2012 02:12:05 -0800 (PST) In-Reply-To: <53f772f8762eb4f7a7a41072e795a3ba.squirrel@www.antarean.org> References: <53f772f8762eb4f7a7a41072e795a3ba.squirrel@www.antarean.org> Date: Thu, 16 Feb 2012 17:12:05 +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=bcaec55239726884d304b9120ff6 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: 2cef8d78-73b8-4042-a5c2-806a72066898 X-Archives-Hash: 199f6c99288c3fb94aa0b492c32c39c3 --bcaec55239726884d304b9120ff6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 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; 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/pepo= luan > > > > 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/gatewall > > and then recreate the original link for the init-script. > IIRC, it's the responsibility of runscript to source the relevant 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, --bcaec55239726884d304b9120ff6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Feb 16, 2012 3:33 PM, "J. Roeleveld" <joost@antarean.org> 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= was
> > previously) to 0.9.8.4.
> >
> > One of the scripts in /etc/init.d was a symlink to /opt/some/pack= age/path
> >
> > (To be precise, /etc/init.d/gatewall ->
> > /opt/wallmator/initscripts/gentoo/gatewall.init)
> >
> > ((wallmator is a "Firewall Automator" script I'm de= veloping))
> >
> > This morning, I rebooted. Upon time to execute the "gatewall= " script,
> > it complained that some settings (set through /etc/conf.d/gatewal= l 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 i= n
> > /etc/conf.d/gatewall.
> >
> > My question is: Is there a change of behavior in how openrc execu= tes 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/wallmat= or/src/edae2e294d07/initscript/gentoo/gatewall.init
> >
> > Rgds,
> > --
> > FdS Pandu E Poluan
> > ~ IT Optimizer ~
> >
> > =C3=82=C2=A0=C3=A2=E2=82=AC=C2=A2 LOPSA Member #15248
> > =C3=82=C2=A0=C3=A2=E2=82=AC=C2=A2 Blog : http://pepoluan.tumblr.com
> > =C3=82=C2=A0=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 if the scr= ipts are
> looking for the "conf.d" file in the location:
> " ../conf.d " (based from the actual location of the init-sc= ript)
>
> 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 co= nfig 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,

--bcaec55239726884d304b9120ff6--