/[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 519 by dpavlin, Tue Aug 24 11:44:06 2010 UTC revision 533 by dpavlin, Fri Sep 17 19:37:03 2010 UTC
# Line 17  our $mounted; Line 17  our $mounted;
17  our $server;  our $server;
18  our $server_ip;  our $server_ip;
19    
20  sub available { qw/katalog debian_live webconverger debirf tinycore nfsroot openvz printer wrt clonezilla ubuntu memdisk vyatta/ };  sub available { qw/katalog debian_live webconverger debirf tinycore nfsroot openvz printer wrt clonezilla ubuntu memdisk vyatta android/ };
21    
22  sub debian_live {  sub debian_live {
23          my ($ip) = @_;          my ($ip) = @_;
# Line 116  label linux Line 116  label linux
116    
117  sub tinycore {  sub tinycore {
118          my $ip = shift;          my $ip = shift;
119          upstream::iso( 'http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/tinycore_2.2.iso' );          upstream::iso( 'http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/3.x/release/tinycore-current.iso' );
120          pxelinux::config_for_ip( $ip, qq{          pxelinux::config_for_ip( $ip, qq{
121    
122  default linux  default linux
# Line 195  label $image Line 195  label $image
195    
196  sub vyatta {  sub vyatta {
197          my $ip = shift;          my $ip = shift;
198          upstream::iso( 'http://www.vyatta.com/downloads/vc6.0/vyatta-livecd-virt_VC6.0-2010.06.01_i386.iso' );          upstream::iso( 'http://www.vyatta.com/downloads/vc6.1/vyatta-livecd_VC6.1-2010.08.20_i386.iso' );
199    
200          my $dir = "$server::base_dir/tftp/vyatta";          my $dir = "$server::base_dir/tftp/vyatta";
201          symlink '/usr/lib/syslinux/memdisk', "$dir/memdisk" unless -e "$dir/memdisk";          symlink '/usr/lib/syslinux/memdisk', "$dir/memdisk" unless -e "$dir/memdisk";
# Line 211  label vyatta Line 211  label vyatta
211          });          });
212  }  }
213    
214    sub android {
215            my $ip = shift;
216            my $path = upstream::iso( 'http://android-x86.googlecode.com/files/android-x86-1.6-r2.iso' );
217    
218            my $dir = "$server::base_dir/tftp/android";
219            symlink '/usr/lib/syslinux/memdisk', "$dir/memdisk" unless -e "$dir/memdisk";
220    
221            client::conf $ip => 'kvm.boot' => "n -cdrom $path";
222    
223            pxelinux::config_for_ip( $ip, qq{
224    
225    default android-1.6-donut
226    label android-1.6-donut
227    
228            kernel iso/kernel
229            append initrd=iso/initrd.img root=/dev/ram0 androidboot_hardware=eeepc acpi_sleep=s3_bios,s3_mode quiet SRC= DATA= SDCARD= vga=788 DEBUG=1
230    
231            });
232    }
233    
234  sub in_chroot {  sub in_chroot {
235          my ( $dir, $command ) = @_;          my ( $dir, $command ) = @_;
236          write_file "$dir/tmp/inside.sh", $command;          write_file "$dir/tmp/inside.sh", $command;
# Line 312  sub for_ip { Line 332  sub for_ip {
332          $server = server::as_hash_for $ip;          $server = server::as_hash_for $ip;
333          $server_ip = $server->{ip} || die "no server ip";          $server_ip = $server->{ip} || die "no server ip";
334          my $config = client::conf( $ip => 'config' ) || return;          my $config = client::conf( $ip => 'config' ) || return;
335          eval $config . '($ip)'; # must be last          my $ret = eval $config . '($ip)'; # must be last
336            if ( $@ ) {
337                    warn "ERROR in executing $config($ip): $@\n";
338                    $ret .= qq{<pre style="color:red">$@</pre>};
339            }
340            return $ret;
341  }  }
342    
343  warn 'loaded';  warn 'loaded';

Legend:
Removed from v.519  
changed lines
  Added in v.533

  ViewVC Help
Powered by ViewVC 1.1.26