18 |
our $server; |
our $server; |
19 |
our $server_ip; |
our $server_ip; |
20 |
|
|
21 |
sub available { qw/katalog debian_live webconverger debirf tinycore nfsroot openvz printer wrt clonezilla ubuntu memdisk vyatta android/ }; |
sub available { qw/ |
22 |
|
katalog debian_live webconverger |
23 |
|
debirf tinycore nfsroot |
24 |
|
openvz printer wrt |
25 |
|
clonezilla ubuntu memdisk vyatta android |
26 |
|
systemrescue |
27 |
|
/ }; |
28 |
|
|
29 |
sub debian_live { |
sub debian_live { |
30 |
my ($ip) = @_; |
my ($ip) = @_; |
269 |
|
|
270 |
}); |
}); |
271 |
} |
} |
272 |
|
|
273 |
|
|
274 |
|
# http://www.sysresccd.org/Sysresccd-manual-en_PXE_network_booting |
275 |
|
sub systemrescue { |
276 |
|
my $ip = shift; |
277 |
|
my $path = upstream::iso( 'http://sourceforge.net/projects/systemrescuecd/files/sysresccd-x86/1.6.1/systemrescuecd-x86-1.6.1.iso/download' ); |
278 |
|
|
279 |
|
my $dir = "$server::base_dir/tftp/systemrescue"; |
280 |
|
symlink '/usr/lib/syslinux/memdisk', "$dir/memdisk" unless -e "$dir/memdisk"; |
281 |
|
|
282 |
|
client::conf $ip => 'kvm.boot' => "n -cdrom $path"; |
283 |
|
|
284 |
|
pxelinux::config_for_ip( $ip, qq{ |
285 |
|
|
286 |
|
default systemrescue |
287 |
|
label systemrescue |
288 |
|
|
289 |
|
kernel iso/isolinux/rescuecd |
290 |
|
append initrd=iso/isolinux/initram.igz dodhcp netboot=http://$server::ip:7777/systemrescue/iso/sysrcd.dat |
291 |
|
|
292 |
|
}); |
293 |
|
} |
294 |
|
|
295 |
sub in_chroot { |
sub in_chroot { |
296 |
my ( $dir, $command ) = @_; |
my ( $dir, $command ) = @_; |