summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/2013-February/022581.html
blob: eda613e4be6c669b848be83d55348473aecae147 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-dev] dhclient lease files location
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20dhclient%20lease%20files%20location&In-Reply-To=%3C511378FD.3010503%40colin.guthr.ie%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="022576.html">
   <LINK REL="Next"  HREF="022824.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-dev] dhclient lease files location</H1>
    <B>Colin Guthrie</B> 
    <A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20dhclient%20lease%20files%20location&In-Reply-To=%3C511378FD.3010503%40colin.guthr.ie%3E"
       TITLE="[Mageia-dev] dhclient lease files location">mageia at colin.guthr.ie
       </A><BR>
    <I>Thu Feb  7 10:50:53 CET 2013</I>
    <P><UL>
        <LI>Previous message: <A HREF="022576.html">[Mageia-dev] dhclient lease files location
</A></li>
        <LI>Next message: <A HREF="022824.html">[Mageia-dev] dhclient lease files location
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#22581">[ date ]</a>
              <a href="thread.html#22581">[ thread ]</a>
              <a href="subject.html#22581">[ subject ]</a>
              <a href="author.html#22581">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>'Twas brillig, and Guillaume Rousse at 07/02/13 08:37 did gyre and gimble:
&gt;<i> I'm taking this out of bugzilla for larger visibility:
</I>&gt;<i> <A HREF="https://bugs.mageia.org/show_bug.cgi?id=8391">https://bugs.mageia.org/show_bug.cgi?id=8391</A>
</I>&gt;<i> 
</I>&gt;<i> Initiallly (mageia2), we had both dhcpd (the server) and dhclient (guess
</I>&gt;<i> what?) use a shared directory (/var/lib/dhcp), belonging to dhcp-common
</I>&gt;<i> package, to store their lease file. And I had this bugreport about
</I>&gt;<i> dhclient trying to store under a non-existent /var/lib/dhclient directory.
</I>&gt;<i> 
</I>&gt;<i> I modified the dhcp package as in Fedora, to have each part
</I>&gt;<i> (client/server) use their own, self-provided, state directory to store
</I>&gt;<i> their lease file: /var/lib/dhcpd and /var/lib/dhclient. I expected to
</I>&gt;<i> fix the issue, and making life easier by mimicating fedora setup.
</I>&gt;<i> 
</I>&gt;<i> Then Dave reported he now had the same error message as before, but with
</I>&gt;<i> the old directory: dhclient tries to store lease files under no more
</I>&gt;<i> existent /var/lib/dhcp directory...
</I>&gt;<i> 
</I>&gt;<i> I grepped /etc for occurences of '/var/lib/dhcp', without results. I had
</I>&gt;<i> a look in networkmanager sources, which seems to be the culprit. It once
</I>&gt;<i> used C macro NM_DHCLIENT_STATE_DIRECTORY for this purpose, but not
</I>&gt;<i> anymore. Now, according to current code, it should uses its own state
</I>&gt;<i> directory (/var/lib/NetworkManager) to store those files, but that's
</I>&gt;<i> obviously not the case. And I'm myself having lease files in both
</I>&gt;<i> directories (/var/lib/dhclient and /var/lib/dhcp).
</I>&gt;<i> 
</I>&gt;<i> I'm suspecting a mix of hardcoded or default configuration between dhcp
</I>&gt;<i> (the package), networkmanager and initscripts, but I can't figure where
</I>&gt;<i> exactly. If someone with more knowledge of those deep arcanes could
</I>&gt;<i> help, I'd be very grateful.
</I>
Certainly here with my NM launched dhclient processes, it passes the
&quot;-lf /var/lib/dhcp/dhclient-$FOO-eth0.lease&quot;  argument to it.


What is also strange however is that NM doesn't build for me here. Seems
this was due to a commit by Olav to update it to 0.9.7.995

<A HREF="http://svnweb.mageia.org/packages?view=revision&amp;revision=388631">http://svnweb.mageia.org/packages?view=revision&amp;revision=388631</A>

<A HREF="http://svnweb.mageia.org/packages/cauldron/networkmanager/current/SPECS/networkmanager.spec?r1=388631&amp;r2=388630&amp;pathrev=388631">http://svnweb.mageia.org/packages/cauldron/networkmanager/current/SPECS/networkmanager.spec?r1=388631&amp;r2=388630&amp;pathrev=388631</A>


Interestingly the commit message is &quot;SILENT: undo version change&quot;. Not
quite sure what to make of that. Can you elaborate on the version change
Olav? Perhaps I missed a mail somewhere asking for help rediffing a
patch or something? My memory is buggy :p


Anyway, going back to the 0.9.6.4 version (which is what is available as
built) and I find this via a quick grep:

[<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">colin at jimmy</A> NetworkManager-0.9.6.4]$ grep -rn --exclude=*.po &quot;\.lease&quot;
ChangeLog:19635:	dhclient with &quot;-lf /var/lib/dhcp/dhclient-%s.leases&quot;.
src/dhcp-manager/nm-dhcp-dhclient.c:95:	return g_strdup_printf
(&quot;%s/dhclient%s-%s-%s.lease&quot;,

This uses NM_DHCLIENT_LEASE_DIR which is different to what you mentioned
above.

This appears to be the code in question:

#if defined(TARGET_DEBIAN) || defined(TARGET_SUSE) ||
defined(TARGET_MANDRIVA)
#if defined(DHCLIENT_V3)
#define NM_DHCLIENT_LEASE_DIR			LOCALSTATEDIR &quot;/lib/dhcp3&quot;
#else
#define NM_DHCLIENT_LEASE_DIR           LOCALSTATEDIR &quot;/lib/dhcp&quot;
#endif
#else
#define NM_DHCLIENT_LEASE_DIR           LOCALSTATEDIR &quot;/lib/dhclient&quot;
#endif


I presume just removing the &quot;|| defined(TARGET_MANDRIVA)&quot; bit of the
first #if condition should do the trick.

I'd like to see what Olav had in mind with that commit first tho'. Seems
there are a few changes in NM that will mean we have to refactor things
a bit (it should use NMSTATEDIR in the newer code like you say and thus
be in it's own directory).

Col


-- 

Colin Guthrie
colin(at)mageia.org
<A HREF="http://colin.guthr.ie/">http://colin.guthr.ie/</A>

Day Job:
  Tribalogic Limited <A HREF="http://www.tribalogic.net/">http://www.tribalogic.net/</A>
Open Source:
  Mageia Contributor <A HREF="http://www.mageia.org/">http://www.mageia.org/</A>
  PulseAudio Hacker <A HREF="http://www.pulseaudio.org/">http://www.pulseaudio.org/</A>
  Trac Hacker <A HREF="http://trac.edgewall.org/">http://trac.edgewall.org/</A>
</PRE>












































































<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="022576.html">[Mageia-dev] dhclient lease files location
</A></li>
	<LI>Next message: <A HREF="022824.html">[Mageia-dev] dhclient lease files location
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#22581">[ date ]</a>
              <a href="thread.html#22581">[ thread ]</a>
              <a href="subject.html#22581">[ subject ]</a>
              <a href="author.html#22581">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev
mailing list</a><br>
</body></html>