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