Whamcloud - gitweb
add autoconf dirs to build
[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 # If we have old symlinks, rename them to *.previous
13 if [ -L /boot/$image -a -L /boot/initrd -a \
14      "$(readlink /boot/$image)" != $image-%ver_str -a \
15      "$(readlink /boot/initrd)" != initrd-%ver_str ]; then
16     mv /boot/$image /boot/$image.previous
17     mv /boot/initrd /boot/initrd.previous
18 fi
19
20 # update /boot/vmlinuz symlink
21 relink $image-%ver_str /boot/$image
22
23 if test "$YAST_IS_RUNNING" != instsys ; then
24     if [ -f /etc/fstab ]; then
25         echo Setting up /lib/modules/%ver_str
26         /sbin/update-modules.dep -v %ver_str
27         cd /boot
28         /sbin/mkinitrd -k $image-%ver_str -i initrd-%ver_str
29
30         if [ -e /boot/initrd-%ver_str ]; then
31             relink initrd-%ver_str /boot/initrd
32         else
33             rm -f /boot/initrd
34         fi
35     else
36         echo "please run mkinitrd as soon as your system is complete"
37     fi
38 fi
39
40 if [ "$YAST_IS_RUNNING" != instsys -a -x /sbin/new-kernel-pkg ]; then
41     # Notify boot loader that a new kernel image has been installed.
42     # (during initial installation the boot loader configuration does not
43     #  yet exist when the kernel is installed, but yast kicks the boot
44     #  loader itself later.)
45     /sbin/new-kernel-pkg %ver_str
46 fi