Lines Matching refs:param
338 my %param=@_;
342 if (!defined $param{'add-kernel'} && defined $param{'kernel'}) {
343 $param{'add-kernel'} = $param{'kernel'};
344 } elsif (!defined $param{'add-kernel'} || !defined $param{'title'}) {
347 } elsif (!(-f "$param{'add-kernel'}")) {
348 warn "ERROR: kernel $param{'add-kernel'} not found!\n";
350 } elsif (defined $param{'initrd'} && !(-f "$param{'initrd'}")) {
351 warn "ERROR: initrd $param{'initrd'} not found!\n";
358 $param{title} =~ s/\s+//g;
359 $param{title} = substr($param{title}, 0, 15) if length($param{title}) > 15;
364 if (defined $self->_lookup($param{title})) {
366 if (defined $param{force}) {
367 $self->remove($param{title});
381 if (! defined $param{$p}) {
382 $param{$p} = $sections[$default]{$p};
390 $param{'add-kernel'} =~ s@^/boot/@$bootpath@;
391 $param{'initrd'} =~ s@^/boot/@$bootpath@ unless !defined $param{'initrd'};
394 push (@newkernel, "image=$param{'add-kernel'}\n", "\tlabel=$param{title}\n");
395 push (@newkernel, "\tappend=\"$param{args}\"\n") if defined $param{args};
396 push (@newkernel, "\tinitrd=$param{initrd}\n") if defined $param{initrd};
397 push (@newkernel, "\troot=$param{root}\n") if defined $param{root};
400 if (!defined $param{position} || $param{position} !~ /end|\d+/) {
401 $param{position}=0;
405 if ($param{position}=~/end/ || $param{position} >= $#sections) {
406 $param{position}=$#sections;
416 if ($index==$param{position}) {
427 if (defined $param{'make-default'}) {
428 $self->set_default($param{position});
1388 my %param=@_;
1392 if (!defined $param{'add-kernel'} || !defined $param{'title'}) {
1395 } elsif (!(-f "$param{'add-kernel'}")) {
1396 warn "ERROR: kernel $param{'add-kernel'} not found!\n";
1398 } elsif (defined $param{'initrd'} && !(-f "$param{'initrd'}")) {
1399 warn "ERROR: initrd $param{'initrd'} not found!\n";
1408 if (defined $self->_lookup($param{title})) {
1410 if (defined $param{force}) {
1411 $self->remove($param{title});
1425 if (! defined $param{$p}) {
1426 $param{$p} = $sections[$default]{$p};
1434 $param{'add-kernel'} =~ s@^/boot/@$bootpath@;
1435 $param{'initrd'} =~ s@^/boot/@$bootpath@ unless !defined $param{'initrd'};
1438 push(@newkernel, "title\t$param{title}\n") if defined $param{title};
1439 push(@newkernel, "\troot $param{boot}\n") if defined $param{boot};
1442 if ( defined $param{xen} ) {
1448 $line = "\tmodule $param{'add-kernel'}" if defined $param{'add-kernel'};
1449 $line .= " root=$param{root}" if defined $param{root};
1450 $line .= " $param{args}" if defined $param{args};
1452 push( @newkernel, "\tmodule $param{initrd}\n" ) if defined $param{initrd};
1454 $line = "\tkernel $param{'add-kernel'}" if defined $param{'add-kernel'};
1455 $line .= " root=$param{root}" if defined $param{root};
1456 $line .= " $param{args}" if defined $param{args};
1458 push( @newkernel, "\tinitrd $param{initrd}\n" ) if defined $param{initrd};
1461 push(@newkernel, "\tsavedefault $param{savedefault}\n") if defined $param{savedefault};
1463 foreach my $module (@{$param{'module'}}) {
1469 if (!defined $param{position} || $param{position} !~ /end|\d+/) {
1470 $param{position}=0
1474 if ($param{position}=~/end/ || $param{position} >= $#sections) {
1475 $param{position}=$#sections;
1485 if ($index==$param{position}) {
1496 if (defined $param{'make-default'} || defined $param{'boot-once'}) {
1497 $self->set_default($param{position});
1499 print "Added: $param{'title'}.\n";
2118 my %param=@_;
2122 if (!defined $param{'add-kernel'} || !defined $param{'title'}) {
2125 } elsif (!(-f "$param{'add-kernel'}")) {
2126 warn "ERROR: kernel $param{'add-kernel'} not found!\n";
2128 } elsif (defined $param{'initrd'} && !(-f "$param{'initrd'}")) {
2129 warn "ERROR: initrd $param{'initrd'} not found!\n";
2138 if (defined $self->_lookup($param{title})) {
2140 if (defined $param{force}) {
2141 $self->remove($param{title});
2155 if (! defined $param{$p}) {
2156 $param{$p} = $sections[$default]{$p};
2164 $param{'add-kernel'} =~ s@^/boot/@$bootpath@;
2165 $param{'initrd'} =~ s@^/boot/@$bootpath@ unless !defined $param{'initrd'};
2169 push(@newkernel, "[$param{'title'}]\n");
2170 push(@newkernel, "\ttarget=$param{'target'}\n") if (defined $param{'target'});
2171 push(@newkernel, "\timage=$param{'add-kernel'}\n");
2172 push(@newkernel, "\tramdisk=$param{'initrd'}\n") if (defined $param{'initrd'});
2174 $line .= "root=$param{root} " if (defined $param{'root'});
2175 $line .= "$param{args} " if (defined $param{'args'});
2181 if (!defined $param{position} || $param{position} !~ /end|\d+/) {
2182 $param{position} = 0;
2191 if ($param{'position'} ne 'end' && $index == $param{position}) {
2193 push(@list, $param{'title'});
2199 if ($param{'position'} eq 'end' || $index < $param{'position'}) {
2201 push(@list, $param{'title'});
2202 $param{position} = $index;
2224 if (defined $param{'make-default'} || defined $param{'boot-once'}) {
2225 $self->set_default($param{position});
2227 print "Added: $param{'title'}.\n";