On 08/26/16 at 10:25am, Xunlei Pang wrote:
On 2016/08/26 at 10:11, Baoquan He wrote:
> On 08/25/16 at 06:23pm, Xunlei Pang wrote:
>> diff --git a/kdumpctl b/kdumpctl
>> index 0436bfc..4d83e69 100755
>> --- a/kdumpctl
>> +++ b/kdumpctl
>> @@ -236,12 +236,18 @@ check_config()
>> {
>> local nr
>>
>> - nr=$(awk 'BEGIN{cnt=0}
/^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix/{cnt++} END{print cnt}'
$KDUMP_CONFIG_FILE)
>> + nr=$(awk 'BEGIN{cnt=0}
/^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix|^dracut_args .*\-\-mount/{cnt++}
END{print cnt}' $KDUMP_CONFIG_FILE)
>> [ $nr -gt 1 ] && {
>> echo "More than one dump targets specified."
>> return 1
>> }
>>
>> + nr=$(grep "^dracut_args .*\-\-mount" $KDUMP_CONFIG_FILE | grep -o
"\-\-mount" | wc -l)
>> + [ $nr -gt 1 ] && {
>> + echo "More than one mount targets specified in
\"dracut_args\"."
>> + return 1
>> + }
> Here are you trying to prevent customer from specifying multiple lines
> of "dracut_args --mount "xx.xx.xx.xx:/share /test nfs4 defaults"? If
yes
> , it could be redundent. You have checked that in above duplicate dump
> target checking.
This for detecting the case multiple "--mount" specified in one dracut_args,
for example:
dracut_args --mount "xxx" --mount "yyy"
Yes, got it. Thanks.
Could it be better to say a few words above the
block? Or tell in doc.
>
> Regards,
> Xunlei
>
> >> +
> >> while read config_opt config_val; do
> >> # remove inline comments after the end of a directive.
> >> config_val=$(strip_comments $config_val)
> >> @@ -365,6 +371,11 @@ check_dump_fs_modified()
> >> local _new_dev _new_mntpoint _new_fstype
> >> local _target _path _dracut_args
> >>
> >> + # No need to check in case of mount target specified via
"dracut_args".
> >> + if is_mount_in_dracut_args; then
> >> + return 0
> >> + fi
> >> +
> >> # No need to check in case of raw target.
> >> # Currently we do not check also if ssh/nfs target is specified
> >> if is_ssh_dump_target || is_nfs_dump_target || is_raw_dump_target; then
> >> --
> >> 1.8.3.1
> >> _______________________________________________
> >> kexec mailing list
> >> kexec(a)lists.fedoraproject.org
> >>
https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
> _______________________________________________
> kexec mailing list
> kexec(a)lists.fedoraproject.org
>
https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org