]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - config/firewall/convert-dmz
core125: restart init after glibc uodate
[people/pmueller/ipfire-2.x.git] / config / firewall / convert-dmz
index fbcc4cf9cdc742c93efbf5755d3ffb441abaa3a4..7b7704548cbddd078d72f6f306e5cc606d516400 100755 (executable)
@@ -55,6 +55,15 @@ my $field29 = 'ALL';
 my $field30 = '';
 my $field31 = 'dnat';
 
+if (! -e "$dmzconfig") {
+       print "DMZ config file not found. Exiting!\n";
+       exit(1);
+}
+
+if (! -s "$dmzconfig") {
+       print "Empty DMZ configuration file. Nothing to do. Exiting...\n";
+       exit(0);
+}
 
 open(FILE, $dmzconfig) or die 'Unable to open config file.';
 my @current = <FILE>;