Remove extra checks that fail

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@278 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Eric Edgar 20 years ago
parent 3cac01be80
commit cdc35d27db

@ -3,10 +3,6 @@
get_KV() { get_KV() {
if [ "${CMD_NO_KERNEL_SOURCES}" = '1' -a -e "${CMD_KERNCACHE}" ] if [ "${CMD_NO_KERNEL_SOURCES}" = '1' -a -e "${CMD_KERNCACHE}" ]
then then
[ -d ${TEMP} ] && gen_die "temporary directory already exists! Exiting."
(umask 077 && mkdir ${TEMP}) || {
gen_die "Could not create temporary directory! Exiting."
}
/bin/tar -xj -C ${TEMP} -f ${CMD_KERNCACHE} kerncache.config /bin/tar -xj -C ${TEMP} -f ${CMD_KERNCACHE} kerncache.config
if [ -e ${TEMP}/kerncache.config ] if [ -e ${TEMP}/kerncache.config ]
then then
@ -25,10 +21,8 @@ get_KV() {
fi fi
else else
rm -r ${TEMP}
gen_die "Could not find kerncache.config in the kernel cache! Exiting." gen_die "Could not find kerncache.config in the kernel cache! Exiting."
fi fi
rm -r ${TEMP}
else else
# Configure the kernel # Configure the kernel

@ -70,17 +70,11 @@ gen_kerncache()
gen_kerncache_extract_kernel() gen_kerncache_extract_kernel()
{ {
[ -d ${TEMP} ] && gen_die "temporary directory already exists! Exiting."
(umask 077 && mkdir ${TEMP}) || {
gen_die "Could not create temporary directory! Exiting."
}
/bin/tar -f ${KERNCACHE} -C ${TEMP} -xj /bin/tar -f ${KERNCACHE} -C ${TEMP} -xj
cp "${TEMP}/kernel-${ARCH}-${KV}" "/boot/kernel-${KNAME}-${ARCH}-${KV}" || { cp "${TEMP}/kernel-${ARCH}-${KV}" "/boot/kernel-${KNAME}-${ARCH}-${KV}" || {
rm -r ${TEMP}
gen_die 'Could not copy the kernel binary to /boot!' gen_die 'Could not copy the kernel binary to /boot!'
} }
cp "${TEMP}/System.map-${ARCH}-${KV}" "/boot/System.map-${KNAME}-${ARCH}-${KV}" || { cp "${TEMP}/System.map-${ARCH}-${KV}" "/boot/System.map-${KNAME}-${ARCH}-${KV}" || {
rm -r ${TEMP}
gen_die 'Could not copy System.map to /boot!' gen_die 'Could not copy System.map to /boot!'
} }
rm -r ${TEMP} rm -r ${TEMP}
@ -108,10 +102,6 @@ gen_kerncache_is_valid()
BUILD_KERNEL=0 BUILD_KERNEL=0
# Can make this more secure .... # Can make this more secure ....
[ -d ${TEMP} ] && gen_die "temporary directory already exists! Exiting."
(umask 077 && mkdir ${TEMP}) || {
gen_die "Could not create temporary directory! Exiting."
}
/bin/tar -xj -f ${KERNCACHE} -C ${TEMP} /bin/tar -xj -f ${KERNCACHE} -C ${TEMP}
if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e ${TEMP}/kernel-${ARCH}-${KV} ] if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e ${TEMP}/kernel-${ARCH}-${KV} ]
@ -119,16 +109,9 @@ gen_kerncache_is_valid()
print_info 1 'Valid kernel cache found; no sources will be used' print_info 1 'Valid kernel cache found; no sources will be used'
KERNCACHE_IS_VALID=1 KERNCACHE_IS_VALID=1
fi fi
/bin/rm -r ${TEMP}
else else
if [ -e "${KERNCACHE}" ] if [ -e "${KERNCACHE}" ]
then then
[ -d ${TEMP} ] && gen_die "temporary directory already exists! Exiting."
(umask 077 && mkdir ${TEMP}) || {
gen_die "Could not create temporary directory! Exiting."
}
/bin/tar -xj -f ${KERNCACHE} -C ${TEMP} /bin/tar -xj -f ${KERNCACHE} -C ${TEMP}
if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e /${KERNEL_DIR}/.config ] if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e /${KERNEL_DIR}/.config ]
then then
@ -144,7 +127,6 @@ gen_kerncache_is_valid()
KERNCACHE_IS_VALID=1 KERNCACHE_IS_VALID=1
fi fi
fi fi
/bin/rm -r ${TEMP}
fi fi
fi fi
export KERNCACHE_IS_VALID export KERNCACHE_IS_VALID

Loading…
Cancel
Save