- Timestamp:
- Feb 23, 2012, 8:43:53 PM (13 years ago)
- Location:
- devel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/etc/pb.conf
r1408 r1413 551 551 ospathcmd-busybox default = /usr/lib/mindi/rootfs/bin/busybox 552 552 553 # Where is the keyboard config file 554 ospathcmd-keyfile default = /etc/rc.config 555 ospathcmd-keyfile rpm = /etc/sysconfig/keyboard 556 ospathcmd-keyfile slackware = /etc/rc.d/rc.keymap 557 ospathcmd-keyfile debian = /etc/rc.config,/etc/console/boottime.kmap.gz 558 ospathcmd-keyfile ubuntu = /etc/console-setup/boottime.kmap.gz,/etc/console-setup/cached.kmap.gz 559 ospathcmd-keyfile arch = /etc/rc.conf 560 ospathcmd-keyfile gentoo = /etc/conf.d/keymaps 561 # Where is the keyboard directory 562 ospathcmd-keymapdir default = /usr/lib/kbd/keymaps 563 # ??? 564 ospathcmd-keymapdir slackware = /usr/share/kbd/keymaps 565 553 566 # Some path for commands may defer from one system to another 554 567 ospathcmd-halt default = /sbin/halt -
devel/pbmkbm/bin/pbmkbm
r1408 r1413 138 138 =item B<-s|--script script> 139 139 140 Name of the script you want to execute on the related boot media at the end o the build.140 Name of the script you want to execute on the related boot media at the end of the build. 141 141 142 142 =item B<-a|--add pkg1[,pkg2,...]> … … 437 437 # BootLoader and its configuration 438 438 # Additional data files coming from a potential caller (MondoRescue/Mindi e.g. with fstab, LVM, mountlist, ...) 439 pb_log(1,"End of boot media creation\n"); 439 440 } 440 441 … … 443 444 my $tgtree = shift; 444 445 446 pb_log(1,"Analyzing your busybox's configuration\n"); 445 447 # First, check which are the supported command in that version of busybox 446 448 # and create the links for it in the target VE … … 476 478 pb_log(2,"Target Tree is now: ".Dumper($tgtree)."\n"); 477 479 close(BUSY); 480 pb_log(1,"End of busybox analysis\n"); 481 } 482 483 sub pb_mkbm_find_keyboard { 484 485 pb_log(1,"Analyzing your keyboard's configuration\n"); 486 my $keyfile = pb_distro_get_param($pbos,pb_conf_get("ospathcmd-keyfile")); 487 die "Unable to read the keyfile $keyfile" if (! -r $keyfile); 488 my $keymapdir = pb_distro_get_param($pbos,pb_conf_get("ospathcmd-keymapdir")); 489 die "Unable to read the keymapdir $keymapdir" if (! -d $keymapdir); 490 491 pb_log(1,"End of keyboard analysis\n"); 478 492 } 479 493 … … 482 496 my $kernel = shift; 483 497 484 $kernel->is_xen = undef; 498 pb_log(1,"Analyzing your kernel's configuration\n"); 499 $kernel->{"is_xen"} = undef; 485 500 # See if we're booted from a Xen kernel 486 501 # From http://wiki.xensource.com/xenwiki/XenCommonProblems#head-26434581604cc8357d9762aaaf040e8d87b37752 … … 488 503 # It's a Xen kernel 489 504 pb_log(2,"INFO: We found a Xen Kernel running\n"); 490 } 505 $kernel->{"is_xen"} = 1; 506 } 507 $kernel->{"release"} = pb_get_osrelease(); 491 508 492 509 my $kfile = pb_distro_get_param($pbos,pb_conf_get_if("mkbmkernelfile")); 493 510 if ((defined $kfile) && ($kfile ne "")) { 494 511 pb_log(1,"INFO: You specified your kernel as $kfile, so using it\n"); 495 $kernel-> file= $kfile;512 $kernel->{"file"} = $kfile; 496 513 } else { 497 $kernel->dir = pb_distro_get_param($pbos,pb_conf_get("mkbmkerneldir")); 498 die "ERROR: The mkbmkerneldir content ($kernel->dir) doesn't refer to a directory\n"if (! -d $kernel->dir); 499 pb_log(1,"INFO: Analyzing directory $kernel->dir to find your kernel"); 500 $kernel->namere = pb_distro_get_param($pbos,pb_conf_get("mkbmkernelnamere")); 501 } 502 503 # TODO: Look at a better way to find the name of the kernel we run 504 # look at /proc/sys/kernel/bootloader_type /proc/sys/kernel/bootloader_version 505 # to have a better guess 506 my $dh; 507 die "ERROR: Unable to open the mkbmkerneldir content ($kernel->dir)" if (! opendir($dh,$kernel->dir)); 508 while (readdir $dh) { 509 # Skip non-files 510 next if ((! -f $_) && (! -l $_)); 511 # Skip files not correpsonding to the RE planned 512 next if ($_ !~ /$kernel->namere/); 513 #my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat("$f/$_"); 514 } 515 closedir($dh); 516 $kernel->release = pb_get_osrelase(); 514 $kernel->{"dir"} = pb_distro_get_param($pbos,pb_conf_get("mkbmkerneldir")); 515 die "ERROR: The mkbmkerneldir content ($kernel->{'dir'}) doesn't refer to a directory\n" if (! -d $kernel->{"dir"}); 516 pb_log(1,"INFO: Analyzing directory $kernel->{'dir'} to find your kernel\n"); 517 $kernel->{"namere"} = pb_distro_get_param($pbos,pb_conf_get("mkbmkernelnamere")); 518 519 # TODO: Look at a better way to find the name of the kernel we run 520 # look at /proc/sys/kernel/bootloader_type /proc/sys/kernel/bootloader_version 521 # to have a better guess 522 my $dh; 523 die "ERROR: Unable to open the mkbmkerneldir content ($kernel->{'dir'})\n" if (! opendir($dh,$kernel->{"dir"})); 524 while (readdir $dh) { 525 pb_log(3,"Potential kernel file: $_\n"); 526 # Skip non-files 527 next if (! -f "$kernel->{'dir'}/$_"); 528 # Skip files not correpsonding to the RE planned 529 next if ($_ !~ /$kernel->{"namere"}/); 530 # We now have a candidate. Analyze further 531 pb_log(3,"Potential kernel file 2: $_\n"); 532 eval 533 { 534 require File::MimeInfo; 535 File::MimeInfo->import(); 536 }; 537 if ($@) { 538 # File::MimeInfo not found 539 die("ERROR: Install File::MimeInfo to handle kernel file detection\n"); 540 } 541 my $mm = mimetype("$kernel->{'dir'}/$_"); 542 # Skip symlinks 543 next if ($mm =~ /inode\/symlink/); 544 pb_log(2,"file $_ mimetype: $mm\n"); 545 if ($mm =~ /\/x-gzip/) { 546 # on ia64 kernel are gzip compressed 547 } 548 next if (pb_get_content("$kernel->{'dir'}/$_") !~ /$kernel->{"release"}/); 549 pb_log(3,"Potential kernel file 3: $_\n"); 550 $kernel->{"file"} = "$kernel->{'dir'}/$_"; 551 #my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat("$f/$_"); 552 } 553 closedir($dh); 554 } 555 pb_log(1,"INFO: kernel is ".Dumper($kernel)."\n"); 556 pb_log(1,"End of kernel analysis\n"); 517 557 } 518 558
Note:
See TracChangeset
for help on using the changeset viewer.