2 # $Id: save_text.cgi,v 1.2 2005/04/16 14:30:21 jfranken Exp $
3 # File added 2005-04-15 by Johannes Franken <jfranken@jfranken.de>
4 # Distributed under the terms of the GNU General Public License, v2 or later
6 # * Save passed text to dhcpd.conf
8 require './dhcpd-lib.pl';
10 $access{'noconfig'} && &error($text{'text_ecannot'});
11 $conf = &get_config();
13 $file=$config{'dhcpd_conf'};
15 $in{'text'} =~ s/\r//g;
16 $in{'text'} .= "\n" if ($in{'text'} !~ /\n$/);
17 &open_tempfile(FILE, ">$file");
18 &print_tempfile(FILE, $in{'text'});
19 &close_tempfile(FILE);
21 &webmin_log("text", undef, $conf->[$in{'index'}]->{'value'},