FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 02-16-2012, 04:24 AM
Pandu Poluan
 
Default Can no longer use symlinks in /etc/init.d with openrc-0.9.8.4 ?

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 ~

*• LOPSA Member #15248
*• Blog : http://pepoluan.tumblr.com
*• Linked-In : http://id.linkedin.com/in/pepoluan
 
Old 02-16-2012, 05:57 AM
Willie Matthews
 
Default Can no longer use symlinks in /etc/init.d with openrc-0.9.8.4 ?

On Thu, 16 Feb 2012 12:24:45 +0700
Pandu Poluan <pandu@poluan.info> 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,

I didn't have that problem and upgraded yesterday!

--

Willie Matthews
matthews.willie@gmail.com
 
Old 02-16-2012, 06:09 AM
Pandu Poluan
 
Default Can no longer use symlinks in /etc/init.d with openrc-0.9.8.4 ?

On Feb 16, 2012 2:01 PM, "Willie Matthews" <matthews.willie@gmail.com> wrote:

>

> On Thu, 16 Feb 2012 12:24:45 +0700

> Pandu Poluan <pandu@poluan.info> 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,

>

> I didn't have that problem and upgraded yesterday!

>


Hmmm... strange... I can still work around the problem, though. Just manually source the relevant file in /etc/conf.d.


Thanks for the info.


Rgds,
 
Old 02-16-2012, 07:34 AM
"J. Roeleveld"
 
Default Can no longer use symlinks in /etc/init.d with openrc-0.9.8.4 ?

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 ~
>
> *? LOPSA Member #15248
> *? Blog : http://pepoluan.tumblr.com
> *? Linked-In : http://id.linkedin.com/in/pepoluan
>

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.

--
Joost
 
Old 02-16-2012, 09:12 AM
Pandu Poluan
 
Default Can no longer use symlinks in /etc/init.d with openrc-0.9.8.4 ?

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/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 ~

> >

> > Â*• LOPSA Member #15248

> > Â*• Blog : http://pepoluan.tumblr.com

> > Â*• Linked-In : http://id.linkedin.com/in/pepoluan

> >

>

> 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,
 
Old 02-16-2012, 10:11 AM
Florian Philipp
 
Default Can no longer use symlinks in /etc/init.d with openrc-0.9.8.4 ?

Am 16.02.2012 11:12, schrieb Pandu Poluan:
>
> On Feb 16, 2012 3:33 PM, "J. Roeleveld" <joost@antarean.org
> <mailto: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/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 ~
>> >
>> >  • LOPSA Member #15248
>> >  • Blog : http://pepoluan.tumblr.com
>> >  • Linked-In : http://id.linkedin.com/in/pepoluan
>> >
>>
>> 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,
>

Yes, but maybe runscript resolves the real file location and then
sources the conf file relative to that location.

Regards,
Florian Philipp
 
Old 02-16-2012, 10:39 AM
Pandu Poluan
 
Default Can no longer use symlinks in /etc/init.d with openrc-0.9.8.4 ?

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.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/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 ~

> >> >

> >> >  • LOPSA Member #15248

> >> >  • Blog : http://pepoluan.tumblr.com

> >> >  • Linked-In : http://id.linkedin.com/in/pepoluan

> >> >

> >>

> >> 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,

> >

>

> 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,
 
Old 02-16-2012, 10:51 AM
"J. Roeleveld"
 
Default Can no longer use symlinks in /etc/init.d with openrc-0.9.8.4 ?

On Thu, February 16, 2012 12:39 pm, Pandu Poluan wrote:
> 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.org>> wrote:

<SNIP>

>> >>
>> >> 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,
>> >
>>
>> 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,
>

Did those little commands work then? I didn't test them myself.

--
Joost


--
Joost
 
Old 02-16-2012, 10:57 AM
Neil Bothwick
 
Default Can no longer use symlinks in /etc/init.d with openrc-0.9.8.4 ?

On Thu, 16 Feb 2012 18:39:16 +0700, Pandu Poluan wrote:

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

Or use a hardlink instead of a symlink.


--
Neil Bothwick

If you think the problem is bad now, just wait until we've solved it.
 
Old 02-16-2012, 11:32 AM
Pandu Poluan
 
Default Can no longer use symlinks in /etc/init.d with openrc-0.9.8.4 ?

On Feb 16, 2012 6:48 PM, "J. Roeleveld" <joost@antarean.org> wrote:

>

>

> On Thu, February 16, 2012 12:39 pm, Pandu Poluan wrote:

> > 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.org>> wrote:

>

> <SNIP>

>

> >> >>

> >> >> 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,

> >> >

> >>

> >> 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,

> >

>

> Did those little commands work then? I didn't test them myself.

>


Neither have I, actually. Already on my way home when you suggested the commands.


Will try them tomorrow and report here.


Rgds,
 

Thread Tools




All times are GMT. The time now is 05:42 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org