1 |
On 30/09/2014 14:42, meino.cramer@×××.de wrote: |
2 |
> Kerin Millar <kerframil@×××××××××××.uk> [14-09-30 15:08]: |
3 |
>> On 30/09/2014 12:49, meino.cramer@×××.de wrote: |
4 |
>>> Neil Bothwick <neil@××××××××××.uk> [14-09-30 12:44]: |
5 |
>>>> On Tue, 30 Sep 2014 12:39:06 +0200, meino.cramer@×××.de wrote: |
6 |
>>>> |
7 |
>>>>>>> [I] sys-apps/ifplugd |
8 |
>>>>>>> Available versions: |
9 |
>>>>>>> 0.28-r9 [doc selinux] |
10 |
>>>>>>> Installed versions: 0.28-r9(11:14:57 12/18/10)(-doc) |
11 |
>>>>>>> Homepage: |
12 |
>>>>>>> http://0pointer.de/lennart/projects/ifplugd/ Description: |
13 |
>>>>>>> Brings up/down ethernet ports automatically with cable detection |
14 |
>>>> |
15 |
>>>>>> and another alternative would be sys-apps/netplug |
16 |
>>>> |
17 |
>>>>> WHOW! That all sounds much more easier than I have dreamt of! |
18 |
>>>>> I did not thought, that such software exists already -- and |
19 |
>>>>> therefore |
20 |
>>>>> did not search for it... |
21 |
>>>> |
22 |
>>>> If you use openrc, you only need to install one of these programs, |
23 |
>>>> not |
24 |
>>>> configure or set it to run. OpenRC detects that one of these programs |
25 |
>>>> is |
26 |
>>>> available and uses it to do exactly what you need. |
27 |
>>>> |
28 |
>>>> |
29 |
>>>> -- |
30 |
>>>> Neil Bothwick |
31 |
>>>> |
32 |
>>>> We are upping our standards - so up yours. |
33 |
>>> |
34 |
>>> ...ok, it works! |
35 |
>>> ...nearly... ;) |
36 |
>>> |
37 |
>>> |
38 |
>>> |
39 |
>>> Unfortunately, ntp-client is configured via rc-update (added to |
40 |
>>> "default") but after plugging in LAN the interface eth0 comes |
41 |
>>> up and I have access via ssh...but the date is set to the beginnig |
42 |
>>> of the UNIX epoch. |
43 |
>>> I have to call ntp-client by hand. |
44 |
>> |
45 |
>> If you know that net.eth0 is specifically required to be up for |
46 |
>> ntp-client to work, you should render OpenRC aware of the fact: |
47 |
>> |
48 |
>> echo 'rc_need="net.eth0"' >> /etc/conf.d/ntp-client |
49 |
>> |
50 |
>> --Kerin |
51 |
>> |
52 |
> |
53 |
> Hi Kerin, |
54 |
> |
55 |
> I tried a similiar thing: |
56 |
> |
57 |
> #!/sbin/runscript |
58 |
> # Copyright 1999-2013 Gentoo Foundation |
59 |
> # Distributed under the terms of the GNU General Public License v2 |
60 |
> # $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntp-client.rc,v 1.13 2013/12/24 11:01:52 vapier Exp $ |
61 |
> |
62 |
> depend() { |
63 |
> before cron portmap |
64 |
> after eth0 |
65 |
> use dns logger |
66 |
> } |
67 |
> |
68 |
> |
69 |
> for "after XYZ" |
70 |
> I set |
71 |
> net |
72 |
> net.eth0 |
73 |
> eth0 |
74 |
> and none worked for me... |
75 |
|
76 |
Using 'after' won't work unless both net.eth0 and ntp-client are in the |
77 |
default runlevel. Obviously, that condition is not satisfied if you are |
78 |
using ifplugd. Please try the solution mentioned in my previous post. It |
79 |
should work. |
80 |
|
81 |
--Kerin |