[dm-devel] [PATCH 14/18] Make use of /run depend on systemd

Hannes Reinecke hare at suse.de
Mon Oct 12 08:35:40 UTC 2015


On 10/12/2015 09:34 AM, Zdenek Kabelac wrote:
> Dne 12.10.2015 v 09:09 Hannes Reinecke napsal(a):
>> On 10/08/2015 09:44 PM, Benjamin Marzinski wrote:
>>> While there are other ways to decide whether to use /run or
>>> /var/run,
>>> I believe this should be good enough, and it uses a Makefile define
>>> that already exists.  If it doesn't work for everyone, I'll
>>> switch it
>>> to actually test the directories and add a new define to CFLAGS.
>>>
>>> Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>
>>> ---
>>>   libmultipath/defaults.h | 4 ++++
>>>   1 file changed, 4 insertions(+)
>>>
>>> diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h
>>> index e2d2779..a313d75 100644
>>> --- a/libmultipath/defaults.h
>>> +++ b/libmultipath/defaults.h
>>> @@ -27,7 +27,11 @@
>>>   #define MAX_CHECKINT(a)        (a << 2)
>>>
>>>   #define MAX_DEV_LOSS_TMO    0x7FFFFFFF
>>> +#ifdef USE_SYSTEMD
>>>   #define DEFAULT_PIDFILE        "/run/multipathd.pid"
>>> +#else
>>> +#define DEFAULT_PIDFILE         "/var/run/multipathd.pid"
>>> +#endif
>>>   #define DEFAULT_CONFIGFILE    "/etc/multipath.conf"
>>>   #define DEFAULT_BINDINGS_FILE    "/etc/multipath/bindings"
>>>   #define DEFAULT_WWIDS_FILE    "/etc/multipath/wwids"
>>>
>> Hmpf. Again.
>>
>> But yeah, I guess it's okay.
>>
>> If only systemd would stop moving things around ...
>>
> 
> I assume things like this should be detected at configure time and
> used  via  'AC_DEFINE()' m4 macro.
> (Check i.e. lvm2 configure.in file)
> (As user may wish to even use completely different directory, to
> make a parallel usable binary)
> 
Yes, please!

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare at suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)




More information about the dm-devel mailing list