+# check the remote server ip address tpye +is_ipv6_target() +{
- local _target=$(get_netdev_target)
- [ -z "$_target" ] && return 1
- echo $(is_ipv6_address $_target)
+}
+# if the passed parameter is hostname/domain, it will be satisfied with +# condition which it is without colon ":", and contains the [a-zA-Z]
What is the purpose of this function? What is the input? $1 = a hostname? or an ip address? or ssh/nfs option value in kdump.conf?
The input is a hostname. We use it to verify the input is hostname or not.
Sorry that I put comment above the function, I means is_hostname instead of is_ipv6_target
Please add description for $1, it is not obvious here.
Is it used in later patches?
Yes, the later patch will use it. I will move it to the later patch.
Thanks Minfei
+is_hostname() +{
- local _hostname=`echo $1 | grep ":"`
+# ipv6 address
- if [ -n "$_hostname" ]; then
return 1- else
echo $1 | grep -q "[a-zA-Z]"- fi
}
1.9.3
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec