Parent Directory | Revision Log
cleanup $file and move it to dhcpd, added config::ip_for to refresh it
1 | 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 | 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 | 1; |
ViewVC Help | |
Powered by ViewVC 1.1.26 |