/[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 538 by dpavlin, Fri Sep 17 22:00:49 2010 UTC revision 539 by dpavlin, Sat Oct 9 12:14:28 2010 UTC
# Line 70  L<http://webconverger.org/> Line 70  L<http://webconverger.org/>
70    
71  =cut  =cut
72    
73    sub _glob_first {
74            my ( $dir, $path ) = @_;
75            my @glob = glob "$dir/$path";
76            my $first = $glob[0] || die "no $dir/$path";
77            $dir   =~ s{iso/*$}{};
78            $first =~ s{^\Q$dir\E}{}g;
79            return $first;
80    }
81    
82  sub webconverger {  sub webconverger {
83          my ($ip) = @_;          my ($ip) = @_;
84    
85          $mounted->{"webconverger/$ip"} ||= upstream::iso( 'http://download.webconverger.com/webc-5.5.iso' );          $mounted->{"webconverger/$ip"} ||= upstream::iso( 'http://download.webconverger.com/webc-6.2.iso' );
86    
87          my $hostname = client::conf( $ip => 'hostname' ) || 'webconverger';          my $hostname = client::conf( $ip => 'hostname' ) || 'webconverger';
88    
# Line 82  sub webconverger { Line 91  sub webconverger {
91          my $fetch    = client::conf( $ip => 'webconverger/fetch'          my $fetch    = client::conf( $ip => 'webconverger/fetch'
92                  , default => "http://$server_ip:7777/webconverger/iso/live/filesystem.squashfs" );                  , default => "http://$server_ip:7777/webconverger/iso/live/filesystem.squashfs" );
93    
94            my $mnt = "$server::base_dir/tftp/webconverger/iso";
95            warn "# mnt: $mnt\n";
96            my $kernel = _glob_first $mnt => 'live/vmlinuz*';
97            my $initrd = _glob_first $mnt => 'live/initrd.img*';
98    
99          pxelinux::config_for_ip( $ip, qq{          pxelinux::config_for_ip( $ip, qq{
100    
101  default webconverger  default webconverger
102  label webconverger  label webconverger
103          kernel iso/live/vmlinuz-2.6.30-backports.1-486          kernel $kernel
104          append initrd=iso/live/initrd.img-2.6.30-backports.1-486 fetch=$fetch boot=live quiet nosudo splash video=vesa:ywrap,mtrr vga=788 nopersistent username=webc hostname=$hostname union=aufs homepage=$homepage locale=hr noprompt kioskresetstation=10          append initrd=$initrd fetch=$fetch boot=live quiet nosudo splash video=vesa:ywrap,mtrr vga=788 nopersistent username=webc hostname=$hostname union=aufs homepage=$homepage locale=hr noprompt kioskresetstation=10
105    
106          });          });
107    

Legend:
Removed from v.538  
changed lines
  Added in v.539

  ViewVC Help
Powered by ViewVC 1.1.26