/[pxelator]/lib/PXElator/config.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /lib/PXElator/config.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 110 - (hide annotations)
Sun Aug 2 02:04:00 2009 UTC (14 years, 8 months ago) by dpavlin
File size: 421 byte(s)
cleanup $file and move it to dhcpd, added config::ip_for to refresh it
1 dpavlin 74 package config;
2    
3     use warnings;
4     use strict;
5    
6     use server;
7     use File::Slurp;
8    
9     sub shared {
10     my ($name, $value) = @_;
11    
12     my $path ="$server::base_dir/conf/$server::ip/$name";
13     if ( defined $value ) {
14     write_file $path, $value;
15     } else {
16     $value = read_file $path if -e $path;
17     }
18     return $value;
19     }
20    
21 dpavlin 110 sub for_ip {
22     my $ip = shift;
23     $tftp::dir = "$server::base_dir/tftp/live-helper/tftpboot";
24     $dhcpd::file = "pxelinux.0";
25     }
26    
27 dpavlin 74 1;

  ViewVC Help
Powered by ViewVC 1.1.26