Whamcloud - gitweb
file raid6-configurable-cachesize.patch was initially added on branch b_raid_test.
[fs/lustre-release.git] / build / suse-post.sh
1 if [ -f /boot/vmlinuz-%ver_str ]; then
2     image=vmlinuz
3 elif [ -f /boot/image-%ver_str ]; then
4     image=image
5 elif [ -f /boot/vmlinux-%ver_str ]; then
6     image=vmlinux
7 else
8     # nothing to do (UML kernels for example).
9     exit 0
10 fi
11
12 case %ver_str in
13     (*xen*|*um*)
14         NOBOOTSPLASH="-s off"
15         SHORTNM=%ver_str
16         SHORTNM=-${SHORTNM##*-}
17         ;;
18     (*)
19         unset NOBOOTSPLASH
20         unset SHORTNM
21         ;;
22 esac    
23
24 # If we have old symlinks, rename them to *.previous
25 if [ -L /boot/$image$SHORTNM -a \
26     "$(readlink /boot/$image$SHORTNM)" != $image-%ver_str ]; then
27         mv /boot/$image$SHORTNM /boot/$image$SHORTNM.previous
28 fi
29 relink $image-%ver_str /boot/$image$SHORTNM
30
31 if test "$YAST_IS_RUNNING" != instsys ; then
32     if [ -f /etc/fstab ]; then
33         echo Setting up /lib/modules/%ver_str
34         if [ -x /sbin/update-modules.dep ]; then
35             /sbin/update-modules.dep -v %ver_str
36         else
37             /sbin/depmod -a -F /boot/System.map-%ver_str %ver_str
38         fi
39         cd /boot
40         /sbin/mkinitrd -k $image-%ver_str -i initrd-%ver_str $NOBOOTSPLASH
41
42         if [ -L /boot/initrd$SHORTNM -a \
43              "$(readlink /boot/initrd)" != initrd-%ver_str ]; then
44             mv /boot/initrd$SHORTNM /boot/initrd$SHORTNM.previous
45         fi  
46         if [ -e /boot/initrd-%ver_str ]; then
47             relink initrd-%ver_str /boot/initrd$SHORTNM
48         else
49             rm -f /boot/initrd$SHORTNM
50         fi
51     else
52         echo "please run mkinitrd as soon as your system is complete"
53     fi
54 fi
55
56 if [ "$YAST_IS_RUNNING" != instsys -a -x /sbin/new-kernel-pkg ]; then
57     # Notify boot loader that a new kernel image has been installed.
58     # (during initial installation the boot loader configuration does not
59     #  yet exist when the kernel is installed, but yast kicks the boot
60     #  loader itself later.)
61     /sbin/new-kernel-pkg %ver_str
62 fi