Adding --symlink to fix bug 98716

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@252 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Eric Edgar 20 years ago
parent 056515d7d8
commit 7b4a6eb417

@ -384,6 +384,10 @@ parse_cmdline() {
CMD_KERNNAME=`parse_opt "$*"`
print_info 2 "KERNNAME: $CMD_KERNNAME"
;;
--symlink)
CMD_SYMLINK=1
print_info 2 "CMD_SYMLINK: $CMD_SYMLINK"
;;
--no-kernel-sources)
CMD_NO_KERNEL_SOURCES=1
print_info 2 "CMD_NO_KERNEL_SOURCES: $CMD_NO_KERNEL_SOURCES"

@ -299,6 +299,13 @@ determine_real_args() {
SAVE_CONFIG=0
fi
if isTrue "${CMD_SYMLINK}"
then
SYMLINK=1
else
SYMLINK=0
fi
if [ "${CMD_INSTALL_MOD_PATH}" != '' ]
then
INSTALL_MOD_PATH="${CMD_INSTALL_MOD_PATH}"

@ -364,6 +364,44 @@ else
fi
fi
if [ "${CMD_NOINSTALL}" != '1' -a "${SYMLINK}" = '1' ]
then
print_info 1 ''
print_info 1 'Creating symlinks'
print_info 1 ' creating kernel name symlink!'
if [ -e /boot/kernel-${KNAME}-${ARCH}-${KV} ]
then
/bin/rm /boot/kernel
ln -s /boot/kernel-${KNAME}-${ARCH}-${KV} /boot/kernel
ret=$?
[ ${ret} = '1' ] && print_error 1 'kernel link failed'
fi
if [ "${PAT}" -gt '4' -a "${CMD_BOOTSPLASH}" != '1' ]
then
print_info 1 ' creating initramfs name symlink!'
if [ -e /boot/initramfs-${KNAME}-${ARCH}-${KV} ]
then
/bin/rm /boot/initramfs
ln -s /boot/initramfs-${KNAME}-${ARCH}-${KV} /boot/initramfs
ret=$?
[ ${ret} = '1' ] && print_error 1 'initramfs link failed'
fi
else
print_info 1 ' creating initrd name symlink!'
if [ -e /boot/initrd-${KNAME}-${ARCH}-${KV} ]
then
/bin/rm /boot/initrd
ln -s /boot/initrd-${KNAME}-${ARCH}-${KV} /boot/initrd
ret=$?
[ ${ret} = '1' ] && print_error 1 'initrd link failed'
fi
fi
fi
[ "${BOOTRW}" != '' ] && mount -o remount,ro /boot
print_info 1 ''

Loading…
Cancel
Save