/[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 503 by dpavlin, Sat Jul 10 12:57:38 2010 UTC revision 513 by dpavlin, Wed Jul 21 17:56:42 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/ };  sub available { qw/katalog debian_live webconverger debirf tinycore nfsroot openvz printer wrt clonezilla ubuntu memdisk/ };
21    
22  sub debian_live {  sub debian_live {
23          my ($ip) = @_;          my ($ip) = @_;
# Line 159  label linux Line 159  label linux
159    
160          });          });
161  }  }
162    
163    sub memdisk {
164            my $ip = shift;
165    
166            my $dir = "$server::base_dir/tftp/memdisk";
167            mkdir $dir unless -e $dir;
168    
169            symlink '/usr/lib/syslinux/memdisk', "$dir/memdisk" unless -e "$dir/memdisk";
170    
171            my $image = client::conf( $ip => 'memdisk.image' );
172    
173            if ( ! $image ) {
174                    $image = 'freedos.gz';
175                    upstream::mirror_file 'http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/unofficial/balder/balder10.imz' => "$dir/$image";
176                    warn "using $image [default FreeDOS]\n";
177            } else {
178                    $image =~ s{^.+/tftp/memdisk/}{} && warn "using $image\n";
179            }
180    
181            pxelinux::config_for_ip( $ip, qq{
182    
183    default $image
184    label $image
185            kernel memdisk
186            append initrd=$image
187    
188            });
189    }
190    
191  sub in_chroot {  sub in_chroot {
192          my ( $dir, $command ) = @_;          my ( $dir, $command ) = @_;

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

  ViewVC Help
Powered by ViewVC 1.1.26