|
|
@ -402,40 +402,56 @@ then
|
|
|
|
[ "${UNIONFS}" -eq '1' ] && print_info 1 ' or "unionfs=<block_device>"'
|
|
|
|
[ "${UNIONFS}" -eq '1' ] && print_info 1 ' or "unionfs=<block_device>"'
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
symlinker() {
|
|
|
|
|
|
|
|
local base=$1
|
|
|
|
|
|
|
|
local fullVer=${KNAME}-${ARCH}-${KV}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local newThing=${BOOTDIR}/${base}-${fullVer}
|
|
|
|
|
|
|
|
local newSym=${BOOTDIR}/${base}
|
|
|
|
|
|
|
|
local oldSym=${newsym}.old
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local prevLink
|
|
|
|
|
|
|
|
local ret=0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print_info 1 " creating ${base} name symlink!"
|
|
|
|
|
|
|
|
if [ -e ${newThing} ] ; then
|
|
|
|
|
|
|
|
if [ -L ${newSym} ] ; then
|
|
|
|
|
|
|
|
prevLink=`readlink --no-newline ${newSym}`
|
|
|
|
|
|
|
|
if [ ${prevLink} != ${newThing} ] ; then
|
|
|
|
|
|
|
|
if [ -L ${oldSym} ] ; then
|
|
|
|
|
|
|
|
rm ${oldSym}
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
ln -s ${prevLink} ${oldSym}
|
|
|
|
|
|
|
|
[ $((ret += $?)) ]
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
rm ${newSym}
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
ln -s ${newThing} ${newSym}
|
|
|
|
|
|
|
|
[ $((ret += $?)) ]
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [[ ${ret} > 0 ]] ; then
|
|
|
|
|
|
|
|
print_error 1 " $base link failed: ${ret}"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ${ret}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${CMD_NOINSTALL}" != '1' -a "${SYMLINK}" = '1' ]
|
|
|
|
if [ "${CMD_NOINSTALL}" != '1' -a "${SYMLINK}" = '1' ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
print_info 1 'Creating symlinks'
|
|
|
|
print_info 1 'Creating symlinks'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print_info 1 ' creating kernel name symlink!'
|
|
|
|
symlinker kernel
|
|
|
|
if [ -e ${BOOTDIR}/kernel-${KNAME}-${ARCH}-${KV} ]
|
|
|
|
symlinker System.map
|
|
|
|
then
|
|
|
|
|
|
|
|
/bin/rm ${BOOTDIR}/kernel
|
|
|
|
if [ "${KERN_24}" != '1' -a "${CMD_BOOTSPLASH}" != '1' ] ; then
|
|
|
|
ln -s ${BOOTDIR}/kernel-${KNAME}-${ARCH}-${KV} ${BOOTDIR}/kernel
|
|
|
|
symlinker initramfs
|
|
|
|
ret=$?
|
|
|
|
else
|
|
|
|
[ ${ret} = '1' ] && print_error 1 'kernel link failed'
|
|
|
|
symlinker initrd
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${KERN_24}" != '1' -a "${CMD_BOOTSPLASH}" != '1' ]
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
print_info 1 ' creating initramfs name symlink!'
|
|
|
|
|
|
|
|
if [ -e ${BOOTDIR}/initramfs-${KNAME}-${ARCH}-${KV} ]
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
/bin/rm ${BOOTDIR}/initramfs
|
|
|
|
|
|
|
|
ln -s ${BOOTDIR}/initramfs-${KNAME}-${ARCH}-${KV} ${BOOTDIR}/initramfs
|
|
|
|
|
|
|
|
ret=$?
|
|
|
|
|
|
|
|
[ ${ret} = '1' ] && print_error 1 'initramfs link failed'
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
print_info 1 ' creating initrd name symlink!'
|
|
|
|
|
|
|
|
if [ -e ${BOOTDIR}/initrd-${KNAME}-${ARCH}-${KV} ]
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
/bin/rm ${BOOTDIR}/initrd
|
|
|
|
|
|
|
|
ln -s ${BOOTDIR}/initrd-${KNAME}-${ARCH}-${KV} ${BOOTDIR}/initrd
|
|
|
|
|
|
|
|
ret=$?
|
|
|
|
|
|
|
|
[ ${ret} = '1' ] && print_error 1 'initrd link failed'
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|