summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xetc/rc.initial.setlanip7
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/rc.initial.setlanip b/etc/rc.initial.setlanip
index 5b60132..14213b5 100755
--- a/etc/rc.initial.setlanip
+++ b/etc/rc.initial.setlanip
@@ -258,7 +258,12 @@ function console_configure_ip_address($version) {
$upperifname, $label_IPvX) . "\n> ";
$intip = chop(fgets($fp));
$is_ipaddr = ($version === 6) ? is_ipaddrv6($intip) : is_ipaddrv4($intip);
- } while (!($is_ipaddr || $intip == ''));
+ if ($is_ipaddr && is_ipaddr_configured($intip, $interface, true)) {
+ $ip_conflict = true;
+ echo gettext("This IP address conflicts with another interface or a VIP") . "\n";
+ } else
+ $ip_conflict = false;
+ } while (($ip_conflict === true) || !($is_ipaddr || $intip == ''));
if ($intip != '') {
echo "\n" . sprintf(gettext("Subnet masks are entered as bit counts (as in CIDR notation) in %s."),
$g['product_name']) . "\n";
OpenPOWER on IntegriCloud