diff options
author | jkh <jkh@FreeBSD.org> | 2001-09-15 02:28:18 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 2001-09-15 02:28:18 +0000 |
commit | e6b17ee5c43e0360bbc930b8de517430b66e07d2 (patch) | |
tree | 1c8da3f6087f8d7dd5aa70f77658a22c66881233 /usr.sbin | |
parent | 0718b5e9edcc88aca0e1446f0c8c767c0b2e5378 (diff) | |
download | FreeBSD-src-e6b17ee5c43e0360bbc930b8de517430b66e07d2.zip FreeBSD-src-e6b17ee5c43e0360bbc930b8de517430b66e07d2.tar.gz |
Rework the RTSOL logic from previous patch (it was wrong)
PR: 26187 && 24136
Submitted by: Glenn Trewitt <trewitt@trewitt.org>
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sysinstall/tcpip.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/usr.sbin/sysinstall/tcpip.c b/usr.sbin/sysinstall/tcpip.c index 424b027..ca219f6 100644 --- a/usr.sbin/sysinstall/tcpip.c +++ b/usr.sbin/sysinstall/tcpip.c @@ -350,9 +350,14 @@ tcpOpenDialog(Device *devp) else { /* See if there are any defaults */ char *cp; - /* Try a RTSOL scan if such behavior is desired */ + /* + * Try a RTSOL scan if such behavior is desired. + * If the variable was configured and is YES, do it. + * If it was configured to anything else, treat it as NO. + * Otherwise, ask the question interactively. + */ if (!variable_cmp(VAR_TRY_RTSOL, "YES") || - ((variable_cmp(VAR_TRY_RTSOL, "NO")) && (!msgNoYes("Do you want to try IPv6 configuration of the interface?")))) { + (variable_get(VAR_TRY_RTSOL)==0 && !msgNoYes("Do you want to try IPv6 configuration of the interface?"))) { int i; int len; @@ -376,9 +381,15 @@ tcpOpenDialog(Device *devp) use_rtsol = FALSE; } - /* First try a DHCP scan if such behavior is desired */ + + /* + * First try a DHCP scan if such behavior is desired. + * If the variable was configured and is YES, do it. + * If it was configured to anything else, treat it as NO. + * Otherwise, ask the question interactively. + */ if (!variable_cmp(VAR_TRY_DHCP, "YES") || - ((variable_cmp(VAR_TRY_DHCP, "NO")) && (!msgNoYes("Do you want to try DHCP configuration of the interface?")))) { + (variable_get(VAR_TRY_DHCP)==0 && !msgNoYes("Do you want to try DHCP configuration of the interface?"))) { Mkdir("/var/db"); Mkdir("/var/run"); Mkdir("/tmp"); |