-
Notifications
You must be signed in to change notification settings - Fork 788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wizard: reimplement system setup #8378
Conversation
<dnsmasq> | ||
<enable>1</enable> | ||
<port>0</port> | ||
<interface>lan</interface> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if people don't assign a "lan" interface in console assignment this can be a problem. we also need to make sure migrations do the normalize dance then on this field and the one in dhcp_ranges ;(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fichtner but isn't this the same for isc at the moment?
core/src/etc/config.xml.sample
Lines 96 to 104 in 3e299b2
<dhcpd> | |
<lan> | |
<enable/> | |
<range> | |
<from>192.168.1.100</from> | |
<to>192.168.1.199</to> | |
</range> | |
</lan> | |
</dhcpd> |
In practice this likely means we need to replace the dhcpd sections in console.inc, which I haven't looked at yet (but should do indeed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dhcp is disabled when lan is not used, yes, this ties back to the console.inc madness
as far as isc doing it, also yes, but it's not an mvc migration-breaks-on-validation case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the console part should be handled implemented via 70b1672 now.
@@ -328,7 +328,7 @@ function get_searchdomains() | |||
$master_list[] = $syscfg['dnssearchdomain']; | |||
} | |||
|
|||
if (isset($syscfg['dnsallowoverride'])) { | |||
if (!empty($syscfg['dnsallowoverride'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we did have issues with one of these before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fichtner not sure what it was, but for simplicity, I prefer the empty()
variants, so if it doesn't work as it should, we might have to figure out why that is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was #2751 and looks like it was fixed in the way we want, but then we should move all spots to !empty, not just this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -365,7 +365,8 @@ | |||
<page-wizard-system> | |||
<name>System Setup Wizard</name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Menu says System: Wizard, I wonder if can bury it in System: Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a strong preference, can change the acl description or the menu item.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
system: settings or system: configuration, decide after merge
70b1672
to
a56e108
Compare
src/etc/inc/xmlparse.inc
Outdated
@@ -51,6 +51,7 @@ function listtags() | |||
'user', | |||
'vip', 'virtual_server', 'vlan', | |||
'winsserver', 'wolentry', 'widget', | |||
'dhcp_ranges' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to add this sorted
src/www/system_general.php
Outdated
@@ -200,7 +200,6 @@ | |||
$config['system']['dnsallowoverride'] = true; | |||
$config['system']['dnsallowoverride_exclude'] = implode(',', $pconfig['dnsallowoverride_exclude']); | |||
} elseif (isset($config['system']['dnsallowoverride'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} elseif (isset($config['system']['dnsallowoverride'])) { | |
} else { |
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/www/services_opendns.php
Outdated
@@ -89,7 +89,7 @@ | |||
$config['system']['dnsserver'][] = $v4_server[0]; | |||
$config['system']['dnsserver'][] = $v4_server[1]; | |||
} | |||
if (isset($config['system']['dnsallowoverride'])) { | |||
if (!empty($config['system']['dnsallowoverride'])) { | |||
unset($config['system']['dnsallowoverride']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to avoid flip flop
unset($config['system']['dnsallowoverride']); | |
$config['system']['dnsallowoverride'] = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments
This commit implements our replacement for the setup wizard. The questions are roughly the same as in the legacy version. Some less relevant options have been removed (pppoe ondemand for example) and isc-dhcpd has been replaced with dnsmasq. Only standard tools have been used, a memory model to validate the data and simple input forms in tabs. The in memory model acts as a wrapper around a legacy configuration data and a couple of component models to apply the requested settings. Some legacy settings using isset() have been altered to use their empty() equivalent.
… the console setup configures the same (#8352) Fix some small php arnings in the process, but further than that just rewrite the dhcpd console handling to use dnsmasq instead of isc. Eventually we will need to rewrite the console tools as well, but let's try to keep this compatible with minimal impact.
588566f
to
c1ef2a5
Compare
closes #8352
This commit implements our replacement for the setup wizard. The questions are roughly the same as in the legacy version. Some less relevant options have been removed (pppoe ondemand for example) and isc-dhcpd has been replaced with dnsmasq.
Only standard tools have been used, a memory model to validate the data and simple input forms in tabs.
The in memory model acts as a wrapper around a legacy configuration data and a couple of component models to apply the requested settings.
Some legacy settings using isset() have been altered to use their empty() equivalent.