/[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 153 - (hide annotations)
Wed Aug 5 23:22:17 2009 UTC (14 years, 7 months ago) by dpavlin
File size: 2080 byte(s)
added client hostname and deploy of configuration over web
1 dpavlin 74 package config;
2    
3     use warnings;
4     use strict;
5 dpavlin 135 use autodie;
6 dpavlin 74
7     use server;
8 dpavlin 129 use pxelinux;
9 dpavlin 74 use File::Slurp;
10    
11 dpavlin 153 sub available { qw/debian_live webconverger debirf tinycore/ };
12    
13 dpavlin 129 sub debian_live {
14     $dhcpd::file = "pxelinux.0";
15     $pxelinux::path_prefix = 'live-helper/tftpboot/';
16     $pxelinux::config_file = 'pxelinux.cfg/default';
17     }
18    
19 dpavlin 138 use upstream;
20    
21 dpavlin 142 =head1 webconverger
22    
23     Webconverger - the opensource Web Kiosk
24    
25     L<http://webconverger.org/>
26    
27     =cut
28    
29 dpavlin 129 sub webconverger {
30 dpavlin 153 my ($ip) = @_;
31 dpavlin 129
32 dpavlin 138 upstream::iso( 'http://download.webconverger.com/webc-5.2.iso' );
33 dpavlin 129
34 dpavlin 153 my $homepage = server::shared( "$ip/homepage" ) || "http://${server::ip}:7777/client";
35     my $hostname = server::shared( "$ip/hostname" ) || 'webconverger';
36 dpavlin 151
37 dpavlin 138 pxelinux::config_for_ip( $ip, qq{
38 dpavlin 129
39 dpavlin 138 default webconverger
40 dpavlin 135 label webconverger
41     kernel iso/live/vmlinuz-2.6.30-backports.1-486
42 dpavlin 153 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=$hostname union=aufs homepage=$homepage
43 dpavlin 135
44 dpavlin 138 });
45    
46 dpavlin 129 }
47    
48 dpavlin 142 =head1 debirf
49    
50     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.
51    
52     L<http://cmrg.fifthhorseman.net/wiki/debirf>
53    
54     =cut
55    
56     sub debirf {
57     my $ip = shift;
58    
59     upstream::iso( 'http://cmrg.mayfirst.org/debirf/debirf-rescue_lenny_2.6.26-1-686.iso' );
60    
61     pxelinux::config_for_ip( $ip, qq{
62    
63     default linux
64     label linux
65     kernel iso/vmlinuz-2.6.26-1-686
66     append initrd=iso//debirf-rescue_lenny_2.6.26-1-686.cgz
67    
68     });
69     }
70    
71 dpavlin 145 sub tinycore {
72     my $ip = shift;
73     upstream::iso( 'http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/tinycore_2.2.iso' );
74     pxelinux::config_for_ip( $ip, qq{
75    
76     default linux
77     label linux
78     kernel iso/boot/bzImage
79     append initrd=iso/boot/tinycore.gz
80    
81     });
82     }
83    
84 dpavlin 110 sub for_ip {
85     my $ip = shift;
86 dpavlin 151 # debian_live($ip);
87     webconverger($ip);
88 dpavlin 143 # debirf($ip);
89 dpavlin 145 # tinycore($ip);
90 dpavlin 129 # $tftp::dir = "$server::base_dir/tftp/$pxelinux::path_prefix";
91 dpavlin 110 }
92    
93 dpavlin 135 warn 'loaded';
94    
95 dpavlin 74 1;

  ViewVC Help
Powered by ViewVC 1.1.26