--- lib/PXElator/config.pm 2010/02/01 14:40:18 498 +++ lib/PXElator/config.pm 2010/05/03 15:38:16 501 @@ -17,7 +17,7 @@ our $server; our $server_ip; -sub available { qw/katalog debian_live webconverger debirf tinycore nfsroot openvz printer wrt/ }; +sub available { qw/katalog debian_live webconverger debirf tinycore nfsroot openvz printer wrt clonezilla/ }; sub debian_live { my ($ip) = @_; @@ -127,6 +127,18 @@ }); } +sub clonezilla { + my $ip = shift; + upstream::iso( 'http://sourceforge.net/projects/clonezilla/files/clonezilla_live_alternative_testing/clonezilla-live-20100503-lucid.iso/download' ); + pxelinux::config_for_ip( $ip, qq{ + +default linux +label linux + kernel iso/live/vmlinuz + append initrd=iso/live/initrd.img boot=live union=aufs noswap noprompt vga=788 fetch=http://$server_ip:7777/clonezilla/iso/live/filesystem.squashfs + + }); +} sub in_chroot { my ( $dir, $command ) = @_; write_file "$dir/tmp/inside.sh", $command; @@ -185,6 +197,11 @@ } + my $exported = `exportfs | grep $export`; + if ( $exported ne $export ) { + warn "exportfs $exported\n"; + system "sudo exportfs -i -o rw,async,no_root_squash,no_subtree_check,fsid=999 $ip:$export"; + } my $hostname = client::conf( $ip => 'hostname' ) || 'nfsroot'; file::replace "$export/etc/hostname", $hostname;