File: bootup.cgi

package info (click to toggle)
webmin-extra 1.180-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 12,324 kB
  • ctags: 1,200
  • sloc: perl: 39,117; makefile: 125
file content (20 lines) | stat: -rwxr-xr-x 473 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/local/bin/perl
# bootup.cgi
# Enable or disable iptables at boot time

require './firewall-lib.pl';
&ReadParse();
$access{'bootup'} || &error($text{'bootup_ecannot'});
if ($in{'boot'}) {
	&create_firewall_init();
	}
elsif (defined(&disable_at_boot)) {
	&disable_at_boot();
	}
else {
	&foreign_require("init", "init-lib.pl");
	&init::disable_at_boot("webmin-iptables");
	}
&webmin_log($in{'boot'} ? "bootup" : "bootdown");
&redirect("index.cgi?table=$in{'table'}");