mirror of
https://github.com/webmin/webmin.git
synced 2026-06-05 04:40:24 +01:00
* Note: Preserve existing Netplan indentation when updating DNS settings, validate with netplan generate before applying, and surface apply errors to avoid network loss from malformed YAML.
13 lines
305 B
Perl
Executable File
13 lines
305 B
Perl
Executable File
#!/usr/local/bin/perl
|
|
# apply.cgi
|
|
# Apply the current network config
|
|
|
|
require './net-lib.pl';
|
|
$access{'apply'} || &error($text{'apply_ecannot'});
|
|
&error_setup($text{'apply_err'});
|
|
$err = &apply_network();
|
|
$err && &error("<pre>".&html_escape($err)."</pre>");
|
|
sleep(1);
|
|
&webmin_log("apply");
|
|
&redirect("");
|