8 |
use pxelinux; |
use pxelinux; |
9 |
use File::Slurp; |
use File::Slurp; |
10 |
|
|
11 |
|
sub available { qw/debian_live webconverger debirf tinycore/ }; |
12 |
|
|
13 |
sub debian_live { |
sub debian_live { |
14 |
$dhcpd::file = "pxelinux.0"; |
$dhcpd::file = "pxelinux.0"; |
15 |
$pxelinux::path_prefix = 'live-helper/tftpboot/'; |
$pxelinux::path_prefix = 'live-helper/tftpboot/'; |
27 |
=cut |
=cut |
28 |
|
|
29 |
sub webconverger { |
sub webconverger { |
30 |
my $ip = shift; |
my ($ip) = @_; |
31 |
|
|
32 |
upstream::iso( 'http://download.webconverger.com/webc-5.2.iso' ); |
upstream::iso( 'http://download.webconverger.com/webc-5.2.iso' ); |
33 |
|
|
34 |
|
my $homepage = server::shared( "$ip/homepage" ) || "http://${server::ip}:7777/client"; |
35 |
|
my $hostname = server::shared( "$ip/hostname" ) || 'webconverger'; |
36 |
|
|
37 |
pxelinux::config_for_ip( $ip, qq{ |
pxelinux::config_for_ip( $ip, qq{ |
38 |
|
|
39 |
default webconverger |
default webconverger |
40 |
label webconverger |
label webconverger |
41 |
kernel iso/live/vmlinuz-2.6.30-backports.1-486 |
kernel iso/live/vmlinuz-2.6.30-backports.1-486 |
42 |
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 homepage=http://172.16.10.1:7777/ nonetworking nosudo splash video=vesa:ywrap,mtrr vga=788 nopersistent username=webc hostname=webconverger union=aufs |
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 |
|
|
44 |
}); |
}); |
45 |
|
|
68 |
}); |
}); |
69 |
} |
} |
70 |
|
|
71 |
|
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 |
sub for_ip { |
sub for_ip { |
85 |
my $ip = shift; |
my $ip = shift; |
86 |
# debian_live($ip); |
my $deploy = server::shared( "deploy/$ip" ) || 'webconverger'; |
87 |
webconverger($ip); |
eval $deploy . '($ip)'; |
|
# debirf($ip); |
|
88 |
# $tftp::dir = "$server::base_dir/tftp/$pxelinux::path_prefix"; |
# $tftp::dir = "$server::base_dir/tftp/$pxelinux::path_prefix"; |
89 |
} |
} |
90 |
|
|