Mailinglist Archive: opensuse-commit (1083 mails)

< Previous Next >
commit kiwi
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Mon, 17 Sep 2007 17:22:19 +0200
  • Message-id: <20070917152220.24C2E6781B8@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package kiwi
checked in at Mon Sep 17 17:22:19 CEST 2007.

--------
--- arch/i386/kiwi/kiwi.changes 2007-09-14 15:23:22.000000000 +0200
+++ /mounts/work_src_done/STABLE/kiwi/kiwi.changes      2007-09-17 16:53:21.117107000 +0200
@@ -1,0 +2,33 @@
+Mon Sep 17 16:48:51 CEST 2007 - ms@xxxxxxx
+
+- missing mksquashfs is now handled as fatal error
+
+-------------------------------------------------------------------
+Mon Sep 17 15:24:47 CEST 2007 - ms@xxxxxxx
+
+- fixed suse-isolinux exit code
+
+-------------------------------------------------------------------
+Mon Sep 17 08:44:37 CEST 2007 - ms@xxxxxxx
+
+- added call of posbios if installed to obtain BIOS information
+  uploaded into the registry file while a new network client is
+  registered
+- added kernelCheck for installed and active kernel in
+  netboot boot image, suse-linuxrc
+- added image notification if a new image is installed on the
+  client via PXE in the netboot boot image, suse-linuxrc
+- added support for base image usage. This means you can use
+  the contents of a given directory as the base image instead of
+  starting with a clean and empty directory. kiwi will use the
+  overlay technique with either aufs or unionfs to build the
+  target directory as combination of the base (--base-root) image
+  and a new image directory optionally specified with the --root
+  option. As result the image root directory will contain only a
+  part of the complete image which is the data not part of the
+  base image or the data which has been touched/copied. In
+  principal all copy-on-write actions within the combined filesystem
+  causes data to be written in the image root directory. base
+  image support works for the prepare and create steps of kiwi
+   
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kiwi.spec ++++++
--- /var/tmp/diff_new_pack.Yd1810/_old  2007-09-17 17:22:00.000000000 +0200
+++ /var/tmp/diff_new_pack.Yd1810/_new  2007-09-17 17:22:00.000000000 +0200
@@ -16,7 +16,7 @@
 Requires:       perl perl-XML-LibXML perl-libwww-perl screen
 Summary:        OpenSuSE - KIWI Image System
 Version:        1.64
-Release:        5
+Release:        9
 Group:          System/Management
 License:        GPL v2 or later
 Source:         kiwi.tar.bz2
@@ -327,6 +327,30 @@
 %{_datadir}/kiwi/image/oemboot/suse*
 
 %changelog
+* Mon Sep 17 2007 - ms@xxxxxxx
+- missing mksquashfs is now handled as fatal error
+* Mon Sep 17 2007 - ms@xxxxxxx
+- fixed suse-isolinux exit code
+* Mon Sep 17 2007 - ms@xxxxxxx
+- added call of posbios if installed to obtain BIOS information
+  uploaded into the registry file while a new network client is
+  registered
+- added kernelCheck for installed and active kernel in
+  netboot boot image, suse-linuxrc
+- added image notification if a new image is installed on the
+  client via PXE in the netboot boot image, suse-linuxrc
+- added support for base image usage. This means you can use
+  the contents of a given directory as the base image instead of
+  starting with a clean and empty directory. kiwi will use the
+  overlay technique with either aufs or unionfs to build the
+  target directory as combination of the base (--base-root) image
+  and a new image directory optionally specified with the --root
+  option. As result the image root directory will contain only a
+  part of the complete image which is the data not part of the
+  base image or the data which has been touched/copied. In
+  principal all copy-on-write actions within the combined filesystem
+  causes data to be written in the image root directory. base
+  image support works for the prepare and create steps of kiwi
 * Wed Sep 12 2007 - ms@xxxxxxx
 - show the output of --list-profiles in a nicer format
 - added installed OS version check for oemboot

++++++ kiwi.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/kiwi.pl new/kiwi/kiwi.pl
--- old/kiwi/kiwi.pl    2007-09-14 15:17:38.000000000 +0200
+++ new/kiwi/kiwi.pl    2007-09-17 16:49:39.000000000 +0200
@@ -27,6 +27,7 @@
 use KIWIImage;
 use KIWIBoot;
 use KIWIMigrate;
+use KIWIOverlay;
 
 #============================================
 # Globals (Version)
@@ -81,6 +82,7 @@
 our @Profiles;          # list of profiles to include in image
 our $ListProfiles;      # lists the available profiles in image
 our $ForceNewRoot;      # force creation of new root directory
+our $BaseRoot;          # use given path as base system
 
 #============================================
 # Globals
@@ -142,7 +144,8 @@
                #==========================================
                # Initialize installation source tree
                #------------------------------------------
-               my $root = $xml -> createTmpDirectory ( $RootTree );
+               my @root = $xml -> createTmpDirectory ( $RootTree );
+               my $root = $root[1];
                if (! defined $root) {
                        $kiwi -> error ("Couldn't create instsource root");
                        $kiwi -> failed ();
@@ -255,17 +258,19 @@
                #------------------------------------------
                $root = new KIWIRoot (
                        $kiwi,$xml,$Prepare,$RootTree,
-                       "/base-system"
+                       "/base-system",undef,undef,$BaseRoot
                );
                if (! defined $root) {
                        $kiwi -> error ("Couldn't create root object");
                        $kiwi -> failed ();
                        my $code = kiwiExit (1); return $code;
                }
-               if (! defined $root -> init ()) {
-                       $kiwi -> error ("Base initialization failed");
-                       $kiwi -> failed ();
-                       my $code = kiwiExit (1); return $code;
+               if (! defined $BaseRoot) {
+                       if (! defined $root -> init ()) {
+                               $kiwi -> error ("Base initialization failed");
+                               $kiwi -> failed ();
+                               my $code = kiwiExit (1); return $code;
+                       }
                }
                #==========================================
                # Install root system
@@ -290,9 +295,28 @@
        # Create image from chroot system
        #------------------------------------------
        if (defined $Create) {
+               #==========================================
+               # Check for overlay requirements
+               #------------------------------------------
+               my $overlay;
+               my $origroot;
+               if (defined $BaseRoot) {
+                       $overlay = new KIWIOverlay ( $kiwi,$BaseRoot,$Create );
+                       if (! defined $overlay) {
+                               my $code = kiwiExit (1); return $code;
+                       }
+                       $origroot = $Create;
+                       $Create = $overlay -> mountOverlay();
+                       if (! defined $Create) {
+                               my $code = kiwiExit (1); return $code;
+                       }
+               }
                $kiwi -> info ("Reading image description...");
                my $xml = new KIWIXML ( $kiwi,"$Create/image",undef,$SetImageType );
                if (! defined $xml) {
+                       if (defined $BaseRoot) {
+                               $overlay -> resetOverlay();
+                       }
                        my $code = kiwiExit (1); return $code;
                }
                $kiwi -> done();
@@ -306,6 +330,9 @@
                                $kiwi -> failed ();
                                $kiwi -> info   ("No destination directory specified");
                                $kiwi -> failed ();
+                               if (defined $BaseRoot) {
+                                       $overlay -> resetOverlay();
+                               }
                                my $code = kiwiExit (1); return $code;
                        }
                        $kiwi -> done();
@@ -315,14 +342,20 @@
                #------------------------------------------
                $image = new KIWIImage (
                        $kiwi,$xml,$Create,$Destination,$StripImage,
-                       "/base-system"
+                       "/base-system",$origroot
                );
                if (! defined $image) {
+                       if (defined $BaseRoot) {
+                               $overlay -> resetOverlay();
+                       }
                        my $code = kiwiExit (1); return $code;
                }
                my %type = %{$xml->getImageTypeAndAttributes()};
                my $para = checkType ( \%type );
                if (! defined $para) {
+                       if (defined $BaseRoot) {
+                               $overlay -> resetOverlay();
+                       }
                        my $code = kiwiExit (1); return $code;
                }
                #==========================================
@@ -350,6 +383,9 @@
                        undef $main::Create;
                        if (! defined main::main()) {
                                $main::Survive = "default";
+                               if (defined $BaseRoot) {
+                                       $overlay -> resetOverlay();
+                               }
                                my $code = kiwiExit (1); return $code;
                        }
                        $main::Survive = "default";
@@ -407,8 +443,14 @@
                        };
                        $kiwi -> error  ("Unsupported type: $type{type}");
                        $kiwi -> failed ();
+                       if (defined $BaseRoot) {
+                               $overlay -> resetOverlay();
+                       }
                        my $code = kiwiExit (1); return $code;
                }
+               if (defined $BaseRoot) {
+                       $overlay -> resetOverlay();
+               }
                if ($ok) {
                        my $code = kiwiExit (0); return $code;
                } else {
@@ -447,7 +489,7 @@
                #------------------------------------------
                $root = new KIWIRoot (
                        $kiwi,$xml,$Upgrade,undef,
-                       "/base-system",$Upgrade,\@AddPackage
+                       "/base-system",$Upgrade,\@AddPackage,$BaseRoot
                );
                if (! defined $root) {
                        $kiwi -> error ("Couldn't create root object");
@@ -674,6 +716,7 @@
                "setup-grub-splash=s"   => \$SetupSplashForGrub,
                "list-profiles|i=s"     => \$ListProfiles,
                "force-new-root"        => \$ForceNewRoot,
+               "base-root=s"           => \$BaseRoot,
                "help|h"                => \&usage,
                "<>"                    => \&usage
        );
@@ -735,9 +778,12 @@
        print "  kiwi -i | --list-profiles\n";
        print "Image Preparation/Creation:\n";
        print "  kiwi -p | --prepare <image-path>\n";
+       print "     [ --base-root <base-path> ]\n";
        print "  kiwi -c | --create  <image-root>\n";
+       print "     [ --base-root <base-path> ]\n";
        print "Image Upgrade:\n";
        print "  kiwi -u | --upgrade <image-root>\n";
+       print "     [ --base-root <base-path> ]\n";
        print "System to Image migration:\n";
        print "  kiwi -m | --migrate <name> --destdir <destination-path> \\\n";
        print "     [ --exclude <directory> --exclude ... ] \\\n";
@@ -976,8 +1022,9 @@
                                if (-f "/usr/bin/mksquashfs") {       
                                        $para .= ",$type{flags}";
                                } else {
-                                       $kiwi -> warning ("missing mksquashfs: flags $type{flags}");
-                                       $kiwi -> skipped ();
+                                       $kiwi -> error("missing mksquashfs for flag: $type{flags}");
+                                       $kiwi -> failed();
+                                       return undef;
                                }
                        } 
                        last SWITCH;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWIImage.pm new/kiwi/modules/KIWIImage.pm
--- old/kiwi/modules/KIWIImage.pm       2007-09-11 19:56:36.000000000 +0200
+++ new/kiwi/modules/KIWIImage.pm       2007-09-17 10:51:13.000000000 +0200
@@ -48,6 +48,7 @@
        my $imageDest  = shift;
        my $imageStrip = shift;
        my $baseSystem = shift;
+       my $imageOrig  = shift;
        #==========================================
        # Constructor setup
        #------------------------------------------
@@ -80,7 +81,11 @@
                return undef;
        }
        if (! defined $main::LogFile) {
-               $kiwi -> setRootLog ($imageTree.".".$$.".screenrc.log");
+               if (defined $imageOrig) {
+                       $kiwi -> setRootLog ($imageOrig.".".$$.".screenrc.log");
+               } else {
+                       $kiwi -> setRootLog ($imageTree.".".$$.".screenrc.log");
+               }
        }
        my $arch = qx ( arch ); chomp ( $arch );
        $arch = ".$arch";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWILinuxRC.sh new/kiwi/modules/KIWILinuxRC.sh
--- old/kiwi/modules/KIWILinuxRC.sh     2007-09-14 15:18:08.000000000 +0200
+++ new/kiwi/modules/KIWILinuxRC.sh     2007-09-17 10:51:13.000000000 +0200
@@ -132,6 +132,35 @@
        esac
 }
 #======================================
+# kernelCheck
+#--------------------------------------
+function kernelCheck {
+       # /.../
+       # Check this running kernel against the kernel
+       # installed in the image. If the version doesn't
+       # match we need to reboot to activate the system
+       # image kernel.
+       # ----
+       kactive=`uname -r`
+       kreboot=1
+       prefix=$1
+       for i in $prefix/lib/modules/*;do
+               if [ ! -d $i ];then
+                       continue
+               fi
+               kinstname=${i##*/}
+               if [ $kinstname = $kactive ];then
+                       kreboot=0
+                       break
+               fi
+       done
+       if [ $kreboot = 1 ];then
+               Echo "Kernel versions do not match rebooting in 5 sec..."
+               REBOOT_IMAGE="yes"
+               sleep 5
+       fi
+}
+#======================================
 # probeFileSystem
 #--------------------------------------
 function probeFileSystem {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWILog.pm new/kiwi/modules/KIWILog.pm
--- old/kiwi/modules/KIWILog.pm 2007-07-18 10:02:51.000000000 +0200
+++ new/kiwi/modules/KIWILog.pm 2007-09-17 10:51:13.000000000 +0200
@@ -22,15 +22,6 @@
 use Carp qw (cluck);
 
 #==========================================
-# Private
-#------------------------------------------
-#my @showLevel = (0,1,2,3,4,5);
-#my $channel   = \*STDOUT;
-#my $errorOk   = 0;
-#my $fileLog;
-#my $rootLog;
-
-#==========================================
 # Constructor
 #------------------------------------------
 sub new {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWIOverlay.pm new/kiwi/modules/KIWIOverlay.pm
--- old/kiwi/modules/KIWIOverlay.pm     1970-01-01 01:00:00.000000000 +0100
+++ new/kiwi/modules/KIWIOverlay.pm     2007-09-17 10:51:13.000000000 +0200
@@ -0,0 +1,151 @@
+#================
+# FILE          : KIWIOverlay.pm
+#----------------
+# PROJECT       : OpenSUSE Build-Service
+# COPYRIGHT     : (c) 2006 SUSE LINUX Products GmbH, Germany
+#               :
+# AUTHOR        : Marcus Schaefer <ms@xxxxxxx>
+#               :
+# BELONGS TO    : Operating System images
+#               :
+# DESCRIPTION   : This module is used for directory overlay techniques
+#               : based on aufs / unionfs mount calls
+#               :
+#               :
+# STATUS        : Development
+#----------------
+package KIWIOverlay;
+#==========================================
+# Modules
+#------------------------------------------
+use strict;
+use KIWILog;
+
+#==========================================
+# Constructor
+#------------------------------------------
+sub new {
+       # ...
+       # Construct a new KIWIOverlay object. The constructor
+       # will store all information in order to overlay the
+       # given directory information. A check whether the mount
+       # has worked is done on demand
+       # ---
+       #==========================================
+       # Object setup
+       #------------------------------------------
+       my $this  = {};
+       my $class = shift;
+       bless  $this,$class;
+       #==========================================
+       # Module Parameters
+       #------------------------------------------
+       my $kiwi   = shift;
+       my $baseRO = shift;
+       my $rootRW = shift;
+       #==========================================
+       # Constructor setup
+       #------------------------------------------
+       if (! -d $baseRO) {
+               $kiwi -> error  ("Directory $baseRO doesn't exist");
+               $kiwi -> failed ();
+               return undef;
+       }
+       if (! -d $rootRW) {
+               $kiwi -> error ("Directory $rootRW doesn't exist");
+               $kiwi -> failed ();
+               return undef;
+       }
+       #==========================================
+       # Store object data
+       #------------------------------------------
+       $this->{kiwi}   = $kiwi;
+       $this->{baseRO} = $baseRO;
+       $this->{rootRW} = $rootRW;
+       return $this;
+}
+
+#==========================================
+# mountOverlay
+#------------------------------------------
+sub mountOverlay {
+       my $this   = shift;
+       my $kiwi   = $this->{kiwi};
+       my $baseRO = $this->{baseRO};
+       my $rootRW = $this->{rootRW};
+       my $tmpdir;
+       my $inodir;
+       my $result;
+       $tmpdir = qx ( mktemp -q -d /tmp/kiwiRootOverlay.XXXXXX ); chomp $tmpdir;
+       $result = $? >> 8;
+       if ($result != 0) {
+               $kiwi -> error  ("Failed to create overlay tmpdir");
+               $kiwi -> failed ();
+               return undef;
+       }
+       $inodir = qx ( mktemp -q -d /tmp/kiwiRootInode.XXXXXX ); chomp $inodir;
+       $result = $? >> 8;
+       if ($result != 0) {
+               $kiwi -> error  ("Failed to create overlay inode tmpdir");
+               $kiwi -> failed ();
+               return undef;
+       }
+       my $opts = "dirs=$rootRW=rw:$baseRO=ro";
+       my $xino = "$inodir/.aufs.xino";
+       my $data = qx ( mount -t tmpfs tmpfs $inodir );
+       my $code = $? >> 8;
+       if ($code != 0) {
+               $kiwi -> error  ("tmpfs mount failed: $data");
+               $kiwi -> failed ();
+               return undef;
+       }
+       $data = qx ( mount -t aufs -o $opts,xino=$xino aufs $tmpdir 2>&1);
+       $code = $? >> 8;
+       if ($code != 0) {
+               $data = qx (mount -t unionfs -o $opts unionfs $tmpdir 2>&1);
+               $code = $? >> 8;
+               if ($code != 0) {
+                       $kiwi -> error  ("Overlay mount failed: $data");
+                       $kiwi -> failed ();
+                       return undef;
+               }
+       }
+       $this->{tmpdir} = $tmpdir;
+       $this->{inodir} = $inodir;
+       return $tmpdir;
+}
+
+#==========================================
+# resetOverlay
+#------------------------------------------
+sub resetOverlay {
+       my $this   = shift;
+       my $kiwi   = $this->{kiwi};
+       my $tmpdir = $this->{tmpdir};
+       my $inodir = $this->{inodir};
+       my $data;
+       my $code;
+       $data = qx (umount $tmpdir 2>&1);
+       $code = $? >> 8;
+       if ($code != 0) {
+               $kiwi -> warning ("Failed to umount overlay: $data");
+               $kiwi -> skipped ();
+       }
+       $data = qx (umount $inodir 2>&1);
+       $code = $? >> 8;
+       if ($code != 0) {
+               $kiwi -> warning ("Failed to umount tmpfs: $data");
+               $kiwi -> skipped ();
+       }
+       if (! rmdir $tmpdir) {
+               $kiwi -> warning ("Failed to remove overlay: $!");
+               $kiwi -> skipped ();
+       }
+       if (! rmdir $inodir) {
+               $kiwi -> warning ("Failed to remove tmpfs: $!");
+               $kiwi -> skipped ();
+       }
+       return $this;
+}
+
+1;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWIRoot.pm new/kiwi/modules/KIWIRoot.pm
--- old/kiwi/modules/KIWIRoot.pm        2007-09-06 09:57:06.000000000 +0200
+++ new/kiwi/modules/KIWIRoot.pm        2007-09-17 10:51:13.000000000 +0200
@@ -50,6 +50,7 @@
        my $baseSystem = shift;
        my $useRoot    = shift;
        my $addPacks   = shift;
+       my $baseRoot   = shift;
        #==========================================
        # Constructor setup
        #------------------------------------------
@@ -134,7 +135,9 @@
        #==========================================
        # Create root directory
        #------------------------------------------
-       my $root = $xml -> createTmpDirectory ( $useRoot,$selfRoot );
+       my @root = $xml -> createTmpDirectory ( $useRoot,$selfRoot,$baseRoot );
+       my $overlay = $root[2];
+       my $root    = $root[0];
        if ( ! defined $root ) {
                $kiwi -> error ("Couldn't create root dir: $root: $!");
                $kiwi -> failed ();
@@ -144,7 +147,7 @@
        # Set root log file
        #------------------------------------------
        if (! defined $main::LogFile) {
-               $kiwi -> setRootLog ($root."."."$$".".screenrc.log");
+               $kiwi -> setRootLog ($root[1]."."."$$".".screenrc.log");
        }
        #==========================================
        # Get configured name of package manager
@@ -152,7 +155,10 @@
        $kiwi -> info ("Setting up package manager: ");
        my $pmgr = $xml -> getPackageManager();
        if (! defined $pmgr) {
-               rmdir $root;
+               if (defined $overlay) {
+                       $overlay -> resetOverlay();
+               }
+               rmdir $root[1];
                return undef;
        }
        $kiwi -> note ($pmgr);
@@ -164,6 +170,10 @@
                $kiwi,$xml,\%sourceChannel,$root,$pmgr
        );
        if (! defined $manager) {
+               if (defined $overlay) {
+                       $overlay -> resetOverlay();
+               }
+               rmdir $root[1];
                return undef;
        }
        #==========================================
@@ -179,6 +189,8 @@
        $this->{root}          = $root;
        $this->{manager}       = $manager;
        $this->{addPacks}      = $addPacks;
+       $this->{baseRoot}      = $baseRoot;
+       $this->{overlay}       = $overlay;
        return $this;
 }
 
@@ -589,6 +601,7 @@
        if (! -d "$root/sys/block") {
                qx (mkdir -p $root/sys);
                qx (mount -t sysfs  none $root/sys);
+               qx (mkdir -p $root/dev/pts);
                qx (mount -t devpts none $root/dev/pts);
                push (@mountList,"$root/sys");
                push (@mountList,"$root/dev/pts");
@@ -647,6 +660,8 @@
        my $this = shift;
        my $kiwi = $this->{kiwi};
        my $root = $this->{root};
+       my $xml  = $this->{xml};
+       my $overlay = $this->{overlay};
        if (! defined $this->{mountList}) {
                return $this;
        }
@@ -660,6 +675,9 @@
                        qx ( rmdir -p $item 2>&1 );
                }
        }
+       if (defined $this->{baseRoot}) {
+               $overlay -> resetOverlay();
+       }
        return $this;
 }
 
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWIXML.pm new/kiwi/modules/KIWIXML.pm
--- old/kiwi/modules/KIWIXML.pm 2007-09-14 15:17:37.000000000 +0200
+++ new/kiwi/modules/KIWIXML.pm 2007-09-17 10:51:13.000000000 +0200
@@ -22,6 +22,7 @@
 use LWP;
 use KIWILog;
 use KIWIPattern;
+use KIWIOverlay;
 use KIWIManager qw (%packageManager);
 use File::Glob ':glob';
 
@@ -1468,6 +1469,7 @@
        my $this      = shift;
        my $useRoot   = shift;
        my $selfRoot  = shift;
+       my $baseRoot  = shift;
        my $rootError = 1;
        my $root;
        my $code;
@@ -1501,7 +1503,29 @@
        if ( $rootError ) {
                return undef;
        }
-       return $root;
+       my $origroot = $root;
+       my $overlay;
+       if (defined $baseRoot) {
+               $kiwi -> info ("Creating overlay path [$root(rw) + $baseRoot(ro)] ");
+               $overlay = new KIWIOverlay ( $kiwi,$baseRoot,$root );
+               if (! defined $overlay) {
+                       $rootError = 1;
+               }
+               $root = $overlay -> mountOverlay();
+               if (! defined $root) {
+                       $rootError = 1;
+               }
+               if ($rootError) {
+                       $kiwi -> failed;
+               } else {
+                       $kiwi -> note ("-> $root");
+                       $kiwi -> done ();
+               }
+       }
+       if ( $rootError ) {
+               return undef;
+       }
+       return ($root,$origroot,$overlay);
 }
 
 #==========================================
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/.revision new/kiwi/.revision
--- old/kiwi/.revision  2007-09-14 15:21:36.000000000 +0200
+++ new/kiwi/.revision  2007-09-17 16:53:01.000000000 +0200
@@ -1 +1 @@
-619
\ No newline at end of file
+623
\ No newline at end of file
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/isoboot/suse-isolinux new/kiwi/system/boot/isoboot/suse-isolinux
--- old/kiwi/system/boot/isoboot/suse-isolinux  2007-03-21 16:34:03.000000000 +0100
+++ new/kiwi/system/boot/isoboot/suse-isolinux  2007-09-17 16:05:48.000000000 +0200
@@ -203,6 +203,7 @@
        -p "$CD_PREPARER" \
        -publisher "$CD_PUBLISHER" \
        $PARAMS -o $DEST $XPARAMS $SOURCE
+code=$?
 
 #=======================================
 # Clean up
@@ -216,3 +217,5 @@
        echo removing $SORTFILE
        rm -f "$SORTFILE"
 fi
+
+exit $code
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-linuxrc new/kiwi/system/boot/netboot/suse-linuxrc
--- old/kiwi/system/boot/netboot/suse-linuxrc   2007-09-14 15:17:36.000000000 +0200
+++ new/kiwi/system/boot/netboot/suse-linuxrc   2007-09-17 10:51:12.000000000 +0200
@@ -195,8 +195,14 @@
                echo "CRNAME=$SYSALIAS"   >> hwtype.$DHCPCHADDR
                echo "IPADDR=$IPADDR"     >> hwtype.$DHCPCHADDR
                echo "ARCHITECTURE=$ARCH" >> hwtype.$DHCPCHADDR
+               #========================================
+               # Try to get BIOS data if tools are there
+               #----------------------------------------
                if [ -f /sbin/posbios ];then
-                       # TODO... check bios information from a IBM machine
+                       HWBIOS=`/sbin/posbios -b`
+                       echo "HWBIOS=$HWBIOS" >> hwtype.$DHCPCHADDR
+                       HWTYPE=`/sbin/posbios -ms`
+                       echo "HWTYPE=$HWTYPE" >> hwtype.$DHCPCHADDR
                fi
                atftp -p -l hwtype.$DHCPCHADDR \
                        -r upload/hwtype.$DHCPCHADDR $TSERVER >/dev/null 2>&1
@@ -761,7 +767,35 @@
 fi
 
 #======================================
-# 19) copy system dependant files
+# 19) If image is new, notify
+#--------------------------------------
+if [ $LOCAL_BOOT = "no" ];then
+       if test $systemIntegrity = "clean"; then
+               count=0
+               IFS="," ; for i in $IMAGE;do
+                       count=$(($count + 1))
+                       field=0
+                       IFS=";" ; for n in $i;do
+                       case $field in
+                               0) field=1 ;;
+                               1) imageName=$n   ; field=2 ;;
+                               2) imageVersion=$n; field=3 ;;
+                               3) imageServer=$n ; field=4 ;;
+                               4) imageBlkSize=$n
+                       esac
+                       done
+                       Echo "Notify of new image: image/$imageName"
+                       echo "image/$imageName" > bootversion.$DHCPCHADDR
+                       echo "$imageVersion"   >> bootversion.$DHCPCHADDR
+                       atftp --option "blksize 1024" -p -l bootversion.$DHCPCHADDR \
+                               -r upload/bootversion.$DHCPCHADDR $TSERVER >/dev/null 2>&1
+                       rm -f bootversion.$DHCPCHADDR
+               done
+       fi
+fi
+
+#======================================
+# 20) copy system dependant files
 #--------------------------------------
 if [ $LOCAL_BOOT = "no" ];then
        if test $systemIntegrity = "clean";then
@@ -775,14 +809,14 @@
 
 echo 256 > /proc/sys/kernel/real-root-dev
 #======================================
-# 20) umount system filesystems
+# 21) umount system filesystems
 #--------------------------------------
 umount /dev/pts
 umount /sys
 umount /proc
 
 #======================================
-# 21) copy initrd files to image
+# 22) copy initrd files to image
 #--------------------------------------
 if [ -f /image/loader/message ];then
        mv /image/loader/message /mnt/boot
@@ -791,7 +825,12 @@
 cp /include /mnt
 
 #======================================
-# 22) Activate new root
+# 23) check if reboot is required
+#--------------------------------------
+kernelCheck /mnt
+
+#======================================
+# 24) Activate new root
 #--------------------------------------
 Echo "Activating Image: [$imageRootName]"
 cd /mnt && exec < dev/console >dev/console 2>&1
@@ -810,7 +849,7 @@
        rm ./include
 fi
 #======================================
-# 23) reboot system if specified
+# 25) reboot system if specified
 #--------------------------------------
 if [ $LOCAL_BOOT = "no" ];then
        if test ! -z $REBOOT_IMAGE;then
@@ -819,7 +858,7 @@
        fi
 fi
 #======================================
-# 24) Unmount initrd / system init
+# 26) Unmount initrd / system init
 #--------------------------------------
 echo " "
 echo "Booting into final System..."


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >