[Linux-ha-dev] [RFC] Change the behavior of cibadmin on dangerous
options
Andrew Beekhof
beekhof at gmail.com
Wed Dec 5 14:06:09 MST 2007
On Dec 4, 2007, at 6:14 PM, Xinwei Hu wrote:
> 2007/12/5, Lars Marowsky-Bree <lmb at suse.de>:
>> On 2007-12-04T21:29:35, Xinwei Hu <hxinwei at gmail.com> wrote:
>>
>>>> The more dangerous commands usually require a --force option on
>>>> other
>>>> tools. (fsck, mkfs, rpm, drbdadm, ...)
>>> The reason that I don't go this way is concerning the portability.
>>> getopt_long is not a POSIX standard AFAIK.
>>
>> Then make it -f or --force; that would be acceptable as well.
>>
>>>> For cibadmin, -E, -r, (-b, -h, -l for write commands) seem safe
>>>> candidates.
>>>>
>>>> Reading y/n from stdin is not a good approach; the commands might
>>>> require the XML to be on stdin.
>>> You are right.
>>> So how about let the process give verbose warning message on
>>> dangerous
>>> options and sleep N seconds before proceeding ?
>>
>> I don't like sleeping tools. That is annoying in scripts, and when
>> you
>> really want the system to do something _now_.
>>
>> I prefer the -f/--force approach, as it's the most common way on
>> Unix/Linux.
> OK. I picked -Z/--do-what-i-say then. :)
> -E/-r/-w/-b/-f are considered dangerous now.
> Also, exit when non-option ARGV-elements are found, as suggested by
> Dejan.
done:
http://hg.beekhof.net/lha/crm-dev/rev/6e4c6fb9d160
>
>>
>> Regards,
>> Lars
>>
>> --
>> Teamlead Kernel, SuSE Labs, Research and Development
>> SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
>> "Experience is the name everyone gives to their mistakes." -- Oscar
>> Wilde
>>
>> _______________________________________________________
>> Linux-HA-Dev: Linux-HA-Dev at lists.linux-ha.org
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
>> Home Page: http://linux-ha.org/
>>
> <
> cibadmin.patch>_______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
More information about the Linux-HA-Dev
mailing list