/[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 502 by dpavlin, Mon May 3 15:38:16 2010 UTC revision 503 by dpavlin, Sat Jul 10 12:57:38 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/ };  sub available { qw/katalog debian_live webconverger debirf tinycore nfsroot openvz printer wrt clonezilla ubuntu/ };
21    
22  sub debian_live {  sub debian_live {
23          my ($ip) = @_;          my ($ip) = @_;
# Line 139  label linux Line 139  label linux
139    
140          });          });
141  }  }
142    
143    sub ubuntu {
144            my $ip = shift;
145            upstream::iso( 'http://mirrors.us.kernel.org/ubuntu-releases/lucid/ubuntu-10.04-desktop-i386.iso' );
146    
147            my $export = "$server::base_dir/tftp/ubuntu/iso";
148            my $exported = `exportfs | grep $export`;
149            if ( $exported ne $export ) {
150                    warn "exportfs $exported\n";
151                    system "sudo exportfs -i -o rw,async,no_root_squash,no_subtree_check,fsid=999 $ip:$export";
152            }
153            pxelinux::config_for_ip( $ip, qq{
154    
155    default linux
156    label linux
157            kernel iso/casper/vmlinuz
158            append initrd=iso/casper/initrd.lz boot=casper netboot=nfs nfsroot=$server_ip:$export --
159    
160            });
161    }
162    
163  sub in_chroot {  sub in_chroot {
164          my ( $dir, $command ) = @_;          my ( $dir, $command ) = @_;
165          write_file "$dir/tmp/inside.sh", $command;          write_file "$dir/tmp/inside.sh", $command;

Legend:
Removed from v.502  
changed lines
  Added in v.503

  ViewVC Help
Powered by ViewVC 1.1.26