Files
webmin/net/apply.cgi
Ilia Ross 846bbb8252 Fix to preserve Netplan YAML when saving DNS
* 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.
2026-05-19 00:31:34 +02:00

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("");