--- /root/bin/installkernel 2008-07-11 02:20:47.000000000 +0200 +++ /root/bin/installkernel-mkboot 2008-07-11 03:12:21.000000000 +0200 @@ -42,10 +42,9 @@ # The presence of "$dir/$1" is unusual in modern intallations, and # the results are mostly unused. So only recreate them if they # already existed. - if test -L "$dir/$1"; then - if [ "$(readlink -f ${dir}/${1})" = "${dir}/${1}-${ver}" ]; then - ln -sf "$1-$ver.old" "$dir/$1.old" - fi + if test -L "$dir/$1" && + [ "$(readlink -f ${dir}/${1})" = "${dir}/${1}-${ver}" ]; then + ln -sf "$1-$ver.old" "$dir/$1.old" ln -sf "$1-$ver" "$dir/$1" else mv "$dir/$1" "$dir/$1.old" @@ -67,13 +66,12 @@ updatever config "$config" fi -## This is very far from existing practice in modern Debian installations -######################################################################## -# if [ "$(basename $img)" = "vmlinux" ] && [ "$(id -u)" = "0" ] ; then # -# mkboot -i ${dir}/vmlinux-${ver} # -# else # -# mkboot -i ${dir}/vmlinuz-${ver} # -# fi # -######################################################################## +if [ "$(id -u)" = "0" ]; then + if [ "$(basename $img)" = "vmlinux" ]; then + test -L "$dir/vmlinux" && mkboot -i ${dir}/vmlinux-${ver} + else + test -L "$dir/vmlinuz" && mkboot -i ${dir}/vmlinuz-${ver} + fi +fi exit 0