1 |
On Feb 16, 2012 3:33 PM, "J. Roeleveld" <joost@××××××××.org> wrote: |
2 |
> |
3 |
> |
4 |
> On Thu, February 16, 2012 6:24 am, Pandu Poluan wrote: |
5 |
> > I am wondering if any of you had experienced the same difficulty as me: |
6 |
> > |
7 |
> > A couple of days ago, I upgraded openrc from (whatever version it was |
8 |
> > previously) to 0.9.8.4. |
9 |
> > |
10 |
> > One of the scripts in /etc/init.d was a symlink to |
11 |
/opt/some/package/path |
12 |
> > |
13 |
> > (To be precise, /etc/init.d/gatewall -> |
14 |
> > /opt/wallmator/initscripts/gentoo/gatewall.init) |
15 |
> > |
16 |
> > ((wallmator is a "Firewall Automator" script I'm developing)) |
17 |
> > |
18 |
> > This morning, I rebooted. Upon time to execute the "gatewall" script, |
19 |
> > it complained that some settings (set through /etc/conf.d/gatewall are |
20 |
> > not set). I double-checked the settings it complained; yep, they are |
21 |
> > there in /etc/conf.d/gatewall. |
22 |
> > |
23 |
> > I tried `/etc/init.d/gatewall start`, no luck. It still complains of |
24 |
> > some vital non-optional settings not being set. |
25 |
> > |
26 |
> > So, I replaced the symlink: |
27 |
> > |
28 |
> > cd /etc/init.d |
29 |
> > mv gatewall gatewall.old |
30 |
> > cp /opt/wallmator/initscripts/gentoo/gatewall.init gatewall |
31 |
> > |
32 |
> > And tried again `/etc/init.d/gatewall start` ... it worked!! |
33 |
> > |
34 |
> > So I tried `shutdown -r now` ... there's joy in Mudville! The |
35 |
> > "gatewall" initscript now properly reads the settings in |
36 |
> > /etc/conf.d/gatewall. |
37 |
> > |
38 |
> > My question is: Is there a change of behavior in how openrc executes a |
39 |
> > script in /etc/init.d/ when said script is a symlink instead of a |
40 |
> > 'normal' file? |
41 |
> > |
42 |
> > PS: For this particular system, everything under / except /boot |
43 |
> > resides in the same filesystem. |
44 |
> > |
45 |
> > PPS: For the contents of the "gatewall" initscript, see |
46 |
> > |
47 |
https://bitbucket.org/pepoluan/wallmator/src/edae2e294d07/initscript/gentoo/gatewall.init |
48 |
> > |
49 |
> > Rgds, |
50 |
> > -- |
51 |
> > FdS Pandu E Poluan |
52 |
> > ~ IT Optimizer ~ |
53 |
> > |
54 |
> >  • LOPSA Member #15248 |
55 |
> >  • Blog : http://pepoluan.tumblr.com |
56 |
> >  • Linked-In : http://id.linkedin.com/in/pepoluan |
57 |
> > |
58 |
> |
59 |
> Pandu, |
60 |
> |
61 |
> I haven't checked the source yet, but I'm wondering if the scripts are |
62 |
> looking for the "conf.d" file in the location: |
63 |
> " ../conf.d " (based from the actual location of the init-script) |
64 |
> |
65 |
> Can you try the following: |
66 |
> # mkdir -p /opt/wallmator/initscripts/conf.d |
67 |
> # ln -s /etc/init.d/gatewall /opt/wallmator/initscripts/conf.d/gatewall |
68 |
> |
69 |
> and then recreate the original link for the init-script. |
70 |
> |
71 |
|
72 |
IIRC, it's the responsibility of runscript to source the relevant config |
73 |
file in /etc/conf.d, and not the initscript's. |
74 |
|
75 |
If you peruse the code, you can see that I relied on that feature; there is |
76 |
no source-ing of any file in /etc/conf.d |
77 |
|
78 |
Rgds, |