implemented correct start/stop logic (which now works!)
[pxelator] / lib / PXElator / server.pm
index a8ba059..cd1c07b 100644 (file)
@@ -1,7 +1,26 @@
 package server;
 
-our $ip = '172.16.10.1';
+use warnings;
+use strict;
+use File::Slurp;
+
+our $ip      = '172.16.10.1';
+our $netmask = '255.255.255.0';
 
 our ( $ip_from, $ip_to ) = ( 10, 100 );
 
+our $base_dir = '/home/dpavlin/llin/pxelator';
+
+our $debug = 0;
+sub debug {
+       my $new = shift;
+       my $path ="$base_dir/conf/debug";
+       if ( defined $new ) {
+               write_file $path, $debug = $new;
+       } else {
+               $debug = read_file $path if -e $path;
+       }
+       return $debug;
+}
+
 warn "loaded";