Files
webmin/cfengine/up.cgi
2007-04-12 20:24:50 +00:00

15 lines
341 B
Perl
Executable File

#!/usr/local/bin/perl
# up.cgi
# Move an entire section up in the config file
require './cfengine-lib.pl';
&ReadParse();
$conf = $in{'cfd'} ? &get_cfd_config() : &get_config();
$sw1 = $conf->[$in{'idx'}];
$sw2 = $conf->[$in{'idx'}-1];
&swap_directives($conf, $sw1, $sw2);
&flush_file_lines();
&redirect($in{'cfd'} ? "edit_cfd.cgi" : "");