/[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

Diff of /lib/PXElator/config.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 110 by dpavlin, Sun Aug 2 02:04:00 2009 UTC revision 151 by dpavlin, Wed Aug 5 19:48:58 2009 UTC
# Line 2  package config; Line 2  package config;
2    
3  use warnings;  use warnings;
4  use strict;  use strict;
5    use autodie;
6    
7  use server;  use server;
8    use pxelinux;
9  use File::Slurp;  use File::Slurp;
10    
11  sub shared {  sub debian_live {
12          my ($name, $value) = @_;          $dhcpd::file = "pxelinux.0";
13            $pxelinux::path_prefix = 'live-helper/tftpboot/';
14            $pxelinux::config_file = 'pxelinux.cfg/default';
15    }
16    
17    use upstream;
18    
19    =head1 webconverger
20    
21    Webconverger - the opensource Web Kiosk
22    
23    L<http://webconverger.org/>
24    
25    =cut
26    
27    sub webconverger {
28            my ($ip,$append) = @_;
29    
30            upstream::iso( 'http://download.webconverger.com/webc-5.2.iso' );
31    
32            $append ||= 'homepage=http://' . $server::ip . ':7777';
33    
34            pxelinux::config_for_ip( $ip, qq{
35    
36    default webconverger
37    label webconverger
38            kernel iso/live/vmlinuz-2.6.30-backports.1-486
39            append initrd=iso/live/initrd.img-2.6.30-backports.1-486 fetch=http://172.16.10.1:7777/webconverger/iso/live/filesystem.squashfs boot=live quiet nosudo splash video=vesa:ywrap,mtrr vga=788 nopersistent username=webc hostname=webconverger union=aufs $append
40    
41            });
42    
43          my $path ="$server::base_dir/conf/$server::ip/$name";  }
44          if ( defined $value ) {  
45                  write_file $path, $value;  =head1 debirf
46          } else {  
47                  $value = read_file $path if -e $path;  debirf is a system that will create diskless, all-in-ram images (kernel and initramfs) that boot entirely into ram and leave the user in a fully functional Debian system.
48          }  
49          return $value;  L<http://cmrg.fifthhorseman.net/wiki/debirf>
50    
51    =cut
52    
53    sub debirf {
54            my $ip = shift;
55    
56            upstream::iso( 'http://cmrg.mayfirst.org/debirf/debirf-rescue_lenny_2.6.26-1-686.iso' );
57    
58            pxelinux::config_for_ip( $ip, qq{
59    
60    default linux
61    label linux
62            kernel iso/vmlinuz-2.6.26-1-686
63            append initrd=iso//debirf-rescue_lenny_2.6.26-1-686.cgz
64    
65            });
66    }
67    
68    sub tinycore {
69            my $ip = shift;
70            upstream::iso( 'http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/tinycore_2.2.iso' );
71            pxelinux::config_for_ip( $ip, qq{
72    
73    default linux
74    label linux
75            kernel iso/boot/bzImage
76            append initrd=iso/boot/tinycore.gz
77    
78            });
79  }  }
80    
81  sub for_ip {  sub for_ip {
82          my $ip = shift;          my $ip = shift;
83          $tftp::dir = "$server::base_dir/tftp/live-helper/tftpboot";  #       debian_live($ip);
84          $dhcpd::file = "pxelinux.0";          webconverger($ip);
85    #       debirf($ip);
86    #       tinycore($ip);
87    #       $tftp::dir = "$server::base_dir/tftp/$pxelinux::path_prefix";
88  }  }
89    
90    warn 'loaded';
91    
92  1;  1;

Legend:
Removed from v.110  
changed lines
  Added in v.151

  ViewVC Help
Powered by ViewVC 1.1.26