forked from ungleich-public/cdist
Fix shell IPv6 testing (for -e).
This commit is contained in:
parent
36244b8a11
commit
ca424a34e6
4 changed files with 4 additions and 8 deletions
|
@ -67,8 +67,7 @@ DONE
|
||||||
if [ "$upload_file" ]; then
|
if [ "$upload_file" ]; then
|
||||||
echo upload >> "$__messages_out"
|
echo upload >> "$__messages_out"
|
||||||
# IPv6 fix
|
# IPv6 fix
|
||||||
echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$'
|
if $(echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$')
|
||||||
if [ $? -eq 0 ]
|
|
||||||
then
|
then
|
||||||
my_target_host="[${__target_host}]"
|
my_target_host="[${__target_host}]"
|
||||||
else
|
else
|
||||||
|
|
|
@ -44,8 +44,7 @@ basepresent="$(cat "$__object/explorer/basepresent")"
|
||||||
if [ "$state" = "present" ]; then
|
if [ "$state" = "present" ]; then
|
||||||
if [ "$basepresent" = "NONE" ]; then
|
if [ "$basepresent" = "NONE" ]; then
|
||||||
# IPv6 fix
|
# IPv6 fix
|
||||||
echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$'
|
if $(echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$')
|
||||||
if [ $? -eq 0 ]
|
|
||||||
then
|
then
|
||||||
my_target_host="[${__target_host}]"
|
my_target_host="[${__target_host}]"
|
||||||
else
|
else
|
||||||
|
|
|
@ -40,8 +40,7 @@ basepresent="$(cat "$__object/explorer/basepresent")"
|
||||||
if [ "$state" = "present" ]; then
|
if [ "$state" = "present" ]; then
|
||||||
if [ "$basepresent" = "NONE" ]; then
|
if [ "$basepresent" = "NONE" ]; then
|
||||||
# IPv6 fix
|
# IPv6 fix
|
||||||
echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$'
|
if $(echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$')
|
||||||
if [ $? -eq 0 ]
|
|
||||||
then
|
then
|
||||||
my_target_host="[${__target_host}]"
|
my_target_host="[${__target_host}]"
|
||||||
else
|
else
|
||||||
|
|
|
@ -60,8 +60,7 @@ case $uname in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# IPv6 fix
|
# IPv6 fix
|
||||||
echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$'
|
if $(echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$')
|
||||||
if [ $? -eq 0 ]
|
|
||||||
then
|
then
|
||||||
my_target_host="[${__target_host}]"
|
my_target_host="[${__target_host}]"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue