Whamcloud - gitweb
update patches and scripts for SLES 9 SP2
authorjacob <jacob>
Fri, 29 Jul 2005 23:54:32 +0000 (23:54 +0000)
committerjacob <jacob>
Fri, 29 Jul 2005 23:54:32 +0000 (23:54 +0000)
build/lbuild
build/lustre-kernel-2.4.spec.in
build/suse-post.sh
build/suse-postun.sh

index 2f9bc0f..52807a8 100755 (executable)
@@ -204,7 +204,7 @@ check_options()
            CANONICAL_TARGET="rhel-2.6"
            ;;
        2.6-suse)
            CANONICAL_TARGET="rhel-2.6"
            ;;
        2.6-suse)
-           CANONICAL_TARGET="suse-2.6"
+           CANONICAL_TARGET="sles-2.6"
            ;;
        hp_pnnl-2.4)
            CANONICAL_TARGET="hp-pnnl-2.4"
            ;;
        hp_pnnl-2.4)
            CANONICAL_TARGET="hp-pnnl-2.4"
index 5066ea6..e3fa2fe 100644 (file)
@@ -402,6 +402,9 @@ for flavor in "" smp bigmem bigsmp pseries64 BOOT jensen ; do
                                echo "fi" >> ${script}
                                ;;
                        post)
                                echo "fi" >> ${script}
                                ;;
                        post)
+                               # /sbin/update-modules.dep compares when the modules were built, rather
+                               # than installed, so force modules.dep to be recreated
+                               echo "rm -f /lib/modules/%{KVERREL}${flavor}/modules.dep" >> ${script}
                                echo "if [ -f /etc/modprobe.conf ] ; then" >> ${script}                 
                                sed -e "s^%ver_str^%{KVERREL}${flavor}^g" %{SOURCE26} >> ${script}
 
                                echo "if [ -f /etc/modprobe.conf ] ; then" >> ${script}                 
                                sed -e "s^%ver_str^%{KVERREL}${flavor}^g" %{SOURCE26} >> ${script}
 
index ec38664..869fa40 100644 (file)
@@ -9,28 +9,40 @@ else
     exit 0
 fi
 
     exit 0
 fi
 
+case %ver_str in
+    (*xen*|*um*)
+       NOBOOTSPLASH="-s off"
+       SHORTNM=%ver_str
+       SHORTNM=-${SHORTNM##*-}
+       ;;
+    (*)
+       unset NOBOOTSPLASH
+       unset SHORTNM
+       ;;
+esac   
+
 # If we have old symlinks, rename them to *.previous
 # If we have old symlinks, rename them to *.previous
-if [ -L /boot/$image -a -L /boot/initrd -a \
-     "$(readlink /boot/$image)" != $image-%ver_str -a \
-     "$(readlink /boot/initrd)" != initrd-%ver_str ]; then
-    mv /boot/$image /boot/$image.previous
-    mv /boot/initrd /boot/initrd.previous
+if [ -L /boot/$image$SHORTNM -a \
+    "$(readlink /boot/$image$SHORTNM)" != $image-%ver_str ]; then
+       mv /boot/$image$SHORTNM /boot/$image$SHORTNM.previous
 fi
 fi
-
-# update /boot/vmlinuz symlink
-relink $image-%ver_str /boot/$image
+relink $image-%ver_str /boot/$image$SHORTNM
 
 if test "$YAST_IS_RUNNING" != instsys ; then
     if [ -f /etc/fstab ]; then
        echo Setting up /lib/modules/%ver_str
        /sbin/update-modules.dep -v %ver_str
        cd /boot
 
 if test "$YAST_IS_RUNNING" != instsys ; then
     if [ -f /etc/fstab ]; then
        echo Setting up /lib/modules/%ver_str
        /sbin/update-modules.dep -v %ver_str
        cd /boot
-       /sbin/mkinitrd -k $image-%ver_str -i initrd-%ver_str
+       /sbin/mkinitrd -k $image-%ver_str -i initrd-%ver_str $NOBOOTSPLASH
 
 
+       if [ -L /boot/initrd$SHORTNM -a \
+            "$(readlink /boot/initrd)" != initrd-%ver_str ]; then
+           mv /boot/initrd$SHORTNM /boot/initrd$SHORTNM.previous
+       fi  
        if [ -e /boot/initrd-%ver_str ]; then
        if [ -e /boot/initrd-%ver_str ]; then
-           relink initrd-%ver_str /boot/initrd
+           relink initrd-%ver_str /boot/initrd$SHORTNM
        else
        else
-           rm -f /boot/initrd
+           rm -f /boot/initrd$SHORTNM
        fi
     else
        echo "please run mkinitrd as soon as your system is complete"
        fi
     else
        echo "please run mkinitrd as soon as your system is complete"
index eb86d03..44c8798 100644 (file)
@@ -9,7 +9,17 @@ else
     exit 0
 fi
 
     exit 0
 fi
 
-if [ "$(readlink /boot/$image)" = $image-%ver_str ]; then
+case %ver_str in
+    (*xen*|*um*)
+       SHORTNM=%ver_str
+       SHORTNM=-${SHORTNM##*-}
+       ;;
+    (*)
+       unset SHORTNM
+       ;;
+esac
+
+if [ "$(readlink /boot/$image$SHORTNM)" = $image-%ver_str ]; then
     # This may be the last kernel RPM on the system, or it may
     # be an update. In both of those cases the symlinks will
     # eventually be correct. Only if this kernel
     # This may be the last kernel RPM on the system, or it may
     # be an update. In both of those cases the symlinks will
     # eventually be correct. Only if this kernel
@@ -19,25 +29,32 @@ if [ "$(readlink /boot/$image)" = $image-%ver_str ]; then
     # manager will always have a kernel to boot in its default
     # configuration.
     shopt -s nullglob
     # manager will always have a kernel to boot in its default
     # configuration.
     shopt -s nullglob
-    for image in $(cd /boot ; ls -dt $image-*); do
-       initrd=initrd-${image#*-}
-       if [ -f /boot/$image -a -f /boot/$initrd ]; then
-           relink $image /boot/${image%%%%-*}
-           relink $initrd /boot/${initrd%%%%-*}
+    for img in $(cd /boot ; ls -dt $image-*$SHORTNM); do
+       initrd=initrd-${img#*-}
+       if [ -f /boot/$img -a -f /boot/$initrd ]; then
+           relink $img /boot/${img%%%%-*}$SHORTNM
+           relink $initrd /boot/${initrd%%%%-*}$SHORTNM
+
+           # Notify the boot loader that a new kernel image is active.
+           if [ -x /sbin/new-kernel-pkg ]; then
+               /sbin/new-kernel-pkg $(/sbin/get_kernel_version /boot/$img)
+           fi
            break
        fi
     done
     shopt -u nullglob
 fi
 
            break
        fi
     done
     shopt -u nullglob
 fi
 
-# Created in the other kernel's %post
-case "$(readlink /boot/$image.previous)" in
-$image-%ver_str|$(readlink /boot/$image))
-    rm -f /boot/$image.previous ;;
+# Check whether there is a .previous link to the image we're about
+# to remove or to the image we point the new symlink to (so .previous
+# would be identical to the current symlink)
+case "$(readlink /boot/$image$SHORTNM.previous)" in
+$image-%ver_str|$(readlink /boot/$image$SHORTNM))
+    rm -f /boot/$image$SHORTNM.previous ;;
 esac
 esac
-case "$(readlink /boot/initrd.previous)" in
-initrd-%ver_str|$(readlink /boot/initrd))
-    rm -f /boot/initrd.previous ;;
+case "$(readlink /boot/initrd$SHORTNM.previous)" in
+initrd-%ver_str|$(readlink /boot/initrd$SHORTNM))
+    rm -f /boot/initrd$SHORTNM.previous ;;
 esac
 # created in %post
 rm -f /boot/initrd-%ver_str
 esac
 # created in %post
 rm -f /boot/initrd-%ver_str