[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Cluster-devel] [PATCH 2/2] checkquorum.wdmd: add integration script with wdmd



On 10/10/2012 10:06 AM, Dietmar Maurer wrote:
>> On 10/10/2012 6:26 AM, Dietmar Maurer wrote:
>>>> +# rpm based distros
>>>> +[ -d /etc/sysconfig ] && \
>>>> +	[ -f /etc/sysconfig/checkquorum ] && \
>>>> +	. /etc/sysconfig/checkquorum
>>>> +
>>>> +# deb based distros
>>>> +[ ! -d /etc/sysconfig ] && \
>>>> +	[ -f /etc/default/checkquorum ] && \
>>>> +	. /etc/default/checkquorum
>>>> +
>>>
>>> FYI: Some RAID tool vendors delivers utilities for debian which creates
>> directory '/etc/sysconfig'
>>> on debian boxes, so that test is not reliable.
>>>
>>>
>>
>> This might be a controversial argument.
> 
> I just though there are better tests to see if you run on debian, for example:
> 
> [ -f /etc/debian_version && -d /etc/default ]
> 

that doesn´t scale well for debian derivates that don´t ship
debian_version :) (see ubuntu & co..)

You can´t even use something like "which dpkg" since the tool is
available on rpm based distributions... or viceversa.. there is rpm for
Debian & derivates.

hardcoding all distributions is not optimal either, as they might change
policy by version....

Fabio


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]