Displaying 2 results from an estimated 2 matches for "input_ipv4_address".
2009 Nov 11
1
[PATCH] Static IPv4 addresses entered are validated when they're entered.
...fig-networking b/scripts/ovirt-config-networking
index 7d4e363..781553c 100755
--- a/scripts/ovirt-config-networking
+++ b/scripts/ovirt-config-networking
@@ -30,6 +30,28 @@ if ! is_local_storage_configured; then
exit 99
fi
+# $1 - the variable name to set
+# $2 - the input prompt
+function input_ipv4_address {
+ local varname=$1
+ local prompt=$2
+
+ eval $varname=\"\"
+
+ while true; do
+ read -ep "${prompt}: "
+
+ if [ -z "$REPLY" ]; then return; fi
+
+ if is_valid_ipv4 $REPLY; then
+ eval $varname=\"$REPLY\"
+...
2009 Dec 07
1
Rebased...
This version of the patch was rebased to go on top of recent changes committed
to ovirt-config-networking on next.