From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1R3Phi-0003AP-A8 for garchives@archives.gentoo.org; Tue, 13 Sep 2011 09:54:58 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5774121C1F8; Tue, 13 Sep 2011 09:54:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0A97E21C1F8 for ; Tue, 13 Sep 2011 09:54:45 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 834B01B4036 for ; Tue, 13 Sep 2011 09:54:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id D65AA80042 for ; Tue, 13 Sep 2011 09:54:44 +0000 (UTC) From: "Fabio Erculiani" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabio Erculiani" Message-ID: <1e50bd01d27fbc3c3be29753f59f6e9608a19312.lxnay@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: /, defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/linuxrc gen_arch.sh gen_bootloader.sh gen_cmdline.sh gen_compile.sh gen_configkernel.sh gen_determineargs.sh gen_funcs.sh gen_initramfs.sh gen_moddeps.sh gen_package.sh X-VCS-Directories: / defaults/ X-VCS-Committer: lxnay X-VCS-Committer-Name: Fabio Erculiani X-VCS-Revision: 1e50bd01d27fbc3c3be29753f59f6e9608a19312 Date: Tue, 13 Sep 2011 09:54:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 037160f5f522da7667d654c0a2af1b23 commit: 1e50bd01d27fbc3c3be29753f59f6e9608a19312 Author: Fabio Erculiani sabayon org> AuthorDate: Tue Sep 13 09:58:30 2011 +0000 Commit: Fabio Erculiani gentoo org> CommitDate: Tue Sep 13 09:58:30 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/genkernel.git= ;a=3Dcommit;h=3D1e50bd01 trivial: cleanup code, drop whitespaces and some more cruft --- defaults/linuxrc | 60 +++++++++++++++++---------------------------= ----- gen_arch.sh | 2 +- gen_bootloader.sh | 4 +- gen_cmdline.sh | 4 +- gen_compile.sh | 4 +- gen_configkernel.sh | 2 +- gen_determineargs.sh | 14 +++++----- gen_funcs.sh | 10 ++++---- gen_initramfs.sh | 32 +++++++++++++------------- gen_moddeps.sh | 4 +- gen_package.sh | 33 +++++++++++++-------------- 11 files changed, 75 insertions(+), 94 deletions(-) diff --git a/defaults/linuxrc b/defaults/linuxrc index ee74d76..01d5cf9 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -78,7 +78,7 @@ do isoboot=3D*) ISOBOOT=3D${x#*=3D} ;; - # Start Volume manager options=20 + # Start Volume manager options dolvm) USE_LVM_NORMAL=3D1 ;; @@ -100,7 +100,7 @@ do debug) DEBUG=3D'yes' ;; - # Scan delay options=20 + # Scan delay options scandelay=3D*) SDELAY=3D${x#*=3D} ;; @@ -228,30 +228,12 @@ do nounionfs) USE_UNIONFS_NORMAL=3D0 ;; -# unionfs=3D*) =20 -# if [ ! -x /sbin/unionfs ] =20 -# then =20 -# USE_UNIONFS_NORMAL=3D0 =20 -# bad_msg 'unionfs binary not found: abo= rting use of unionfs!' -# else =20 -# USE_UNIONFS_NORMAL=3D1 =20 -# CMD_UNIONFS=3D${x#*=3D} =20 -# echo ${CMD_UNIONFS}|grep , >/dev/null = 2>&1 =20 -# if [ $? -eq 0 ] -# then =20 -# UID=3D$(echo ${CMD_UNIONFS#*,}= ) =20 -# UNIONFS=3D$(echo ${CMD_UNIONFS= %,*})=20 -# else =20 -# UNIONFS=3D${CMD_UNIONFS} =20 -# fi =20 -# fi =20 -# ;; esac done =20 if [ -z "${REAL_ROOT}" -a \( "${CDROOT}" =3D '0' \) -a \( "${FAKE_ROOT}= " !=3D "/dev/ram0" \) ] then - REAL_ROOT=3D"${FAKE_ROOT}"=09 + REAL_ROOT=3D"${FAKE_ROOT}" fi =20 splash 'init' @@ -325,22 +307,22 @@ then =20 RESUME_DEV=3D"" retval=3D1 - =09 + if [ ${retval} -ne 0 ]; then RESUME_DEV=3D$(findfs "${REAL_RESUME}" 2>/dev/null) retval=3D$? fi - =09 + if [ ${retval} -ne 0 ]; then RESUME_DEV=3D$(busybox findfs "${REAL_RESUME}" 2>/dev/null) retval=3D$? fi - =09 + if [ ${retval} -ne 0 ]; then RESUME_DEV=3D$(blkid -l -t "${REAL_RESUME}" | cut -d ":" -f 1 2>/de= v/null) retval=3D$? fi - =09 + if [ ${retval} -eq 0 ] && [ -n "${RESUME_DEV}" ]; then good_msg "Detected real_resume=3D${RESUME_DEV}" REAL_RESUME=3D"${RESUME_DEV}" @@ -362,7 +344,7 @@ if [ "${CDROOT}" =3D '1' ] then good_msg "Making tmpfs for ${NEW_ROOT}" mount -n -t tmpfs tmpfs "${NEW_ROOT}" -=09 + for i in dev mnt mnt/cdrom mnt/livecd mnt/key tmp tmp/.initrd mnt/gento= o sys do mkdir -p "${NEW_ROOT}/${i}" @@ -393,7 +375,7 @@ then if [ "${REAL_ROOT}" =3D '' ] then echo -n -e "${WARN}>>${NORMAL}${BOLD} No bootable medium found. Waitin= g for new devices" - =09 + COUNTER=3D0 while [ ${COUNTER} -lt 3 ]; do sleep 3 @@ -428,26 +410,26 @@ do while [ "${got_good_root}" !=3D '1' ] do case "${REAL_ROOT}" in - LABEL\=3D*|UUID\=3D*) - =09 + LABEL=3D*|UUID=3D*) + ROOT_DEV=3D"" retval=3D1 - =09 + if [ ${retval} -ne 0 ]; then ROOT_DEV=3D$(findfs "${REAL_ROOT}" 2>/dev/null) retval=3D$? fi - =09 + if [ ${retval} -ne 0 ]; then ROOT_DEV=3D$(busybox findfs "${REAL_ROOT}" 2>/dev/null) retval=3D$? fi - =09 + if [ ${retval} -ne 0 ]; then ROOT_DEV=3D$(blkid -l -t "${REAL_ROOT}" | cut -d ":" -f 1 2>/dev/nu= ll) retval=3D$? fi - =09 + if [ ${retval} -eq 0 ] && [ -n "${ROOT_DEV}" ]; then good_msg "Detected real_root=3D${ROOT_DEV}" REAL_ROOT=3D"${ROOT_DEV}" @@ -458,7 +440,7 @@ do fi ;; esac - =09 + if [ "${REAL_ROOT}" =3D '' ] then # No REAL_ROOT determined/specified. Prompt user for root block devic= e. @@ -503,8 +485,8 @@ do mount -t ${ROOTFSTYPE} -o ro,${REAL_ROOTFLAGS} ${REAL_ROOT} ${NEW_RO= OT} fi fi - =09 - # If mount is successful break out of the loop=20 + + # If mount is successful break out of the loop # else not a good root and start over. if [ "$?" =3D '0' ] then @@ -613,7 +595,7 @@ then "${NEW_ROOT}${CDROOT_DEV}" \ "${NEW_ROOT}${REAL_ROOT}" test_success 'losetup /dev/sr0 /dev/loop0' -=09 + good_msg 'Mounting the Root Partition' mount -t squashfs -o ro "${NEW_ROOT}${CDROOT_DEV}" "${NEW_ROOT}/mnt/l= ivecd" test_success 'mount /dev/loop0 /' @@ -631,7 +613,7 @@ then if [ -e "${NEW_ROOT}/mnt/cdrom/add" ] then for targz in $(ls ${NEW_ROOT}/mnt/cdrom/add/*.tar.gz) - do=09 + do tarname=3D$(basename ${targz}) good_msg "Adding additional package ${tarname}" (cd ${NEW_ROOT} ; /bin/tar -xzf ${targz}) @@ -645,7 +627,7 @@ then setup_unionfs ${NEW_ROOT} ${NEW_ROOT}/${FS_LOCATION} CHROOT=3D/union elif [ "${USE_AUFS_NORMAL}" !=3D '1' ]; then -=09 + good_msg "Copying read-write image contents to tmpfs" # Copy over stuff that should be writable (cd "${NEW_ROOT}/${FS_LOCATION}"; cp -a ${ROOT_TREES} "${NEW_ROOT}") diff --git a/gen_arch.sh b/gen_arch.sh index c7bd3cc..866a40f 100755 --- a/gen_arch.sh +++ b/gen_arch.sh @@ -42,7 +42,7 @@ get_official_arch() { then UTILS_ARCH=3D'sparc' fi -=09 + ARCH_CONFIG=3D"${GK_SHARE}/arch/${ARCH}/config.sh" [ -f "${ARCH_CONFIG}" ] || gen_die "${ARCH} not yet supported by genker= nel. Please add the arch-specific config file, ${ARCH_CONFIG}" } diff --git a/gen_bootloader.sh b/gen_bootloader.sh index 3e6f98b..79531d4 100755 --- a/gen_bootloader.sh +++ b/gen_bootloader.sh @@ -60,7 +60,7 @@ set_bootloader_grub() { echo "root (${GRUB_BOOT_DISK},${GRUB_BOOT_PARTITION})" >> ${GRUB_CONF= } echo >> ${GRUB_CONF} =20 - # Add grub configuration to grub.conf=09 + # Add grub configuration to grub.conf echo "# Genkernel generated entry, see GRUB documentation for details= " >> ${GRUB_CONF} echo "title=3DGentoo Linux ($KV)" >> ${GRUB_CONF} if [ "${BUILD_INITRD}" =3D '0' ] @@ -109,7 +109,7 @@ set_bootloader_grub_check_for_existing_entry() { set_bootloader_grub_duplicate_default() { local GRUB_CONF=3D$1 local GRUB_CONF_TMP=3D"${GRUB_CONF}.tmp" -=09 + line_count=3D$(wc -l < "${GRUB_CONF}") line_nums=3D"$(grep -n "^title" "${GRUB_CONF}" | cut -d: -f1)" if [ -z "${line_nums}" ]; then diff --git a/gen_cmdline.sh b/gen_cmdline.sh index b3e451d..f048b28 100755 --- a/gen_cmdline.sh +++ b/gen_cmdline.sh @@ -422,11 +422,11 @@ parse_cmdline() { TEMP=3D${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$ print_info 2 "TMPDIR: ${TMPDIR}" print_info 2 "TEMP: ${TEMP}" - ;;=20 + ;; --postclear) CMD_POSTCLEAR=3D1 print_info 2 "CMD_POSTCLEAR: ${CMD_POSTCLEAR}" - ;;=20 + ;; --arch-override=3D*) CMD_ARCHOVERRIDE=3D`parse_opt "$*"` print_info 2 "CMD_ARCHOVERRIDE: ${CMD_ARCHOVERRIDE}" diff --git a/gen_compile.sh b/gen_compile.sh index 045ca8f..fce0750 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -517,10 +517,10 @@ compile_dmraid() { rm -rf "${TEMP}/device-mapper" > /dev/null /bin/tar -jxpf "${DEVICE_MAPPER_BINCACHE}" -C "${TEMP}" || gen_die "Could not extract device-mapper binary cache!"; - =09 + cd "${DMRAID_DIR}" print_info 1 'dmraid: >> Configuring...' - =09 + LDFLAGS=3D"-L${TEMP}/device-mapper/lib" \ CFLAGS=3D"-I${TEMP}/device-mapper/include" \ CPPFLAGS=3D"-I${TEMP}/device-mapper/include" \ diff --git a/gen_configkernel.sh b/gen_configkernel.sh index faf1874..5d619fa 100755 --- a/gen_configkernel.sh +++ b/gen_configkernel.sh @@ -73,7 +73,7 @@ config_kernel() { else print_info 1 "kernel: --clean is disabled; not running 'make clean'." fi -=09 + if isTrue ${MENUCONFIG} then print_info 1 'kernel: >> Invoking menuconfig...' diff --git a/gen_determineargs.sh b/gen_determineargs.sh index ce479cb..8244269 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -30,7 +30,7 @@ get_KV() { SUB=3D`grep ^SUBLEVEL\ \=3D ${KERNEL_DIR}/Makefile | awk '{ print $3 }= ;'` EXV=3D`grep ^EXTRAVERSION\ \=3D ${KERNEL_DIR}/Makefile | sed -e "s/EXT= RAVERSION =3D//" -e "s/ //g" -e 's/\$([a-z]*)//gi'` =20 - if [ -z "${SUB}" ];=20 + if [ -z "${SUB}" ] then # Handle O=3D build directories KERNEL_SOURCE_DIR=3D`grep ^MAKEARGS\ \:\=3D ${KERNEL_DIR}/Makefile |= awk '{ print $4 };'` @@ -143,7 +143,7 @@ determine_real_args() { FUSE_BINCACHE=3D`cache_replace "${FUSE_BINCACHE}"` UNIONFS_FUSE_BINCACHE=3D`cache_replace "${UNIONFS_FUSE_BINCACHE}"` GPG_BINCACHE=3D`cache_replace "${GPG_BINCACHE}"` - =20 + DEFAULT_KERNEL_CONFIG=3D`arch_replace "${DEFAULT_KERNEL_CONFIG}"` BUSYBOX_CONFIG=3D`arch_replace "${BUSYBOX_CONFIG}"` BUSYBOX_BINCACHE=3D`arch_replace "${BUSYBOX_BINCACHE}"` @@ -166,7 +166,7 @@ determine_real_args() { BOOTLOADER=3D`echo "${CMD_BOOTLOADER}" | cut -f1 -d:` fi fi -=09 + if [ "${NO_KERNEL_SOURCES}" !=3D "1" ] then if [ ! -d ${KERNEL_DIR} ] @@ -192,7 +192,7 @@ determine_real_args() { fi fi =20 - # Special case: If --no-clean is specified on the command line,=20 + # Special case: If --no-clean is specified on the command line, # imply --no-mrproper. if [ "${CMD_CLEAN}" !=3D '' ] then @@ -201,12 +201,12 @@ determine_real_args() { MRPROPER=3D0 fi fi -=09 + if [ -n "${MINKERNPACKAGE}" ] then mkdir -p `dirname ${MINKERNPACKAGE}` fi -=09 + if [ -n "${MODULESPACKAGE}" ] then mkdir -p `dirname ${MODULESPACKAGE}` @@ -221,6 +221,6 @@ determine_real_args() { then INTEGRATED_INITRAMFS=3D0 fi -=09 + get_KV } diff --git a/gen_funcs.sh b/gen_funcs.sh index a5cd5df..13e57c7 100755 --- a/gen_funcs.sh +++ b/gen_funcs.sh @@ -22,7 +22,7 @@ isTrue() { return 1 } =20 -setColorVars() {=20 +setColorVars() { if isTrue ${USECOLOR} then GOOD=3D$'\e[32;01m' @@ -144,7 +144,7 @@ print_info() { DEBUGCACHE=3D"${DEBUGCACHE}${STR}" else echo -ne "${STR}" >> ${LOGFILE} - fi=09 + fi else if [ "${TODEBUGCACHE}" =3D '1' ]; then DEBUGCACHE=3D"${DEBUGCACHE}${STR}"$'\n' @@ -178,7 +178,7 @@ var_replace() # in the later sed expression local SAFE_VAR SAFE_VAR=3D`echo "${2}" | sed -e 's/\([\/\.]\)/\\\\\\1/g'` - =20 + echo "${3}" | sed -e "s/%%${1}%%/${SAFE_VAR}/g" - } =20 @@ -194,7 +194,7 @@ clear_log() { if [ -f "${LOGFILE}" ] then (echo > "${LOGFILE}") 2>/dev/null || small_die "Genkernel: Could not wr= ite to ${LOGFILE}." - fi =20 + fi } =20 gen_die() { @@ -267,7 +267,7 @@ then rm ${TMPDIR}/${i} done fi -}=09 +} =20 # # Function to copy various kernel boot image products to the boot direct= ory, diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 50ddbe5..41c07a6 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -25,7 +25,7 @@ append_base_layout() { =20 echo "/dev/ram0 / ext2 defaults 0 0" > ${TEMP}/initram= fs-base-temp/etc/fstab echo "proc /proc proc defaults 0 0" >> ${TEMP}/ini= tramfs-base-temp/etc/fstab -=09 + cd ${TEMP}/initramfs-base-temp/dev mknod -m 660 console c 5 1 mknod -m 660 null c 1 3 @@ -61,7 +61,7 @@ append_busybox() { ln -s busybox ${TEMP}/initramfs-busybox-temp/bin/$i || gen_die "Busybox error: could not link ${i}!" done -=09 + cd "${TEMP}/initramfs-busybox-temp/" find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "compressing busybox cpio" @@ -174,7 +174,7 @@ append_multipath(){ || gen_die "Could not copy file ${i} for MULTIPATH" done =20 - if [ -x /sbin/multipath ]=20 + if [ -x /sbin/multipath ] then cp /etc/multipath.conf "${TEMP}/initramfs-multipath-temp/etc/" || gen_= die 'could not copy /etc/multipath.conf please check this' fi @@ -475,12 +475,12 @@ append_modules() { else cd / fi -=09 + if [ -d "${TEMP}/initramfs-modules-${KV}-temp" ] then rm -r "${TEMP}/initramfs-modules-${KV}-temp/" fi - mkdir -p "${TEMP}/initramfs-modules-${KV}-temp/lib/modules/${KV}"=09 + mkdir -p "${TEMP}/initramfs-modules-${KV}-temp/lib/modules/${KV}" for i in `gen_dep_list` do mymod=3D`find ./lib/modules/${KV} -name "${i}${MOD_EXT}" 2>/dev/null| = head -n 1 ` @@ -489,11 +489,11 @@ append_modules() { print_warning 2 "Warning :: ${i}${MOD_EXT} not found; skipping..." continue; fi - =09 + print_info 2 "initramfs: >> Copying ${i}${MOD_EXT}..." cp -ax --parents "${mymod}" "${TEMP}/initramfs-modules-${KV}-temp" done -=09 + cp -ax --parents ./lib/modules/${KV}/modules* ${TEMP}/initramfs-modules= -${KV}-temp 2>/dev/null =20 mkdir -p "${TEMP}/initramfs-modules-${KV}-temp/etc/modules" @@ -519,13 +519,13 @@ append_auxilary() { then rm -r "${TEMP}/initramfs-aux-temp/" fi - mkdir -p "${TEMP}/initramfs-aux-temp/etc"=09 - mkdir -p "${TEMP}/initramfs-aux-temp/sbin"=09 + mkdir -p "${TEMP}/initramfs-aux-temp/etc" + mkdir -p "${TEMP}/initramfs-aux-temp/sbin" if [ -f "${CMD_LINUXRC}" ] then cp "${CMD_LINUXRC}" "${TEMP}/initramfs-aux-temp/init" print_info 2 " >> Copying user specified linuxrc: ${CMD_LINUXRC= } to init" - else=09 + else if isTrue ${NETBOOT} then cp "${GK_SHARE}/netboot/linuxrc.x" "${TEMP}/initramfs-aux-temp/init" @@ -546,12 +546,12 @@ append_auxilary() { # big cpio. cd ${TEMP}/initramfs-aux-temp ln -s init linuxrc -# ln ${TEMP}/initramfs-aux-temp/init ${TEMP}/initramfs-aux-temp/linuxrc=20 +# ln ${TEMP}/initramfs-aux-temp/init ${TEMP}/initramfs-aux-temp/linuxrc =20 if [ -f "${GK_SHARE}/arch/${ARCH}/initrd.scripts" ] then cp "${GK_SHARE}/arch/${ARCH}/initrd.scripts" "${TEMP}/initramfs-aux-te= mp/etc/initrd.scripts" - else=09 + else cp "${GK_SHARE}/defaults/initrd.scripts" "${TEMP}/initramfs-aux-temp/e= tc/initrd.scripts" fi =20 @@ -566,13 +566,13 @@ append_auxilary() { then sed -i "s:^REAL_ROOT=3D.*$:REAL_ROOT=3D'${REAL_ROOT}':" "${TEMP}/initr= amfs-aux-temp/etc/initrd.defaults" fi -=09 - echo -n 'HWOPTS=3D"$HWOPTS ' >> "${TEMP}/initramfs-aux-temp/etc/initrd.= defaults"=09 + + echo -n 'HWOPTS=3D"$HWOPTS ' >> "${TEMP}/initramfs-aux-temp/etc/initrd.= defaults" for group_modules in ${!MODULES_*}; do group=3D"$(echo $group_modules | cut -d_ -f2 | tr "[:upper:]" "[:lower= :]")" echo -n "${group} " >> "${TEMP}/initramfs-aux-temp/etc/initrd.defaults= " done - echo '"' >> "${TEMP}/initramfs-aux-temp/etc/initrd.defaults"=09 + echo '"' >> "${TEMP}/initramfs-aux-temp/etc/initrd.defaults" =20 if [ -f "${GK_SHARE}/arch/${ARCH}/modprobe" ] then @@ -607,7 +607,7 @@ append_auxilary() { find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "compressing auxilary cpio" cd "${TEMP}" - rm -r "${TEMP}/initramfs-aux-temp/"=09 + rm -r "${TEMP}/initramfs-aux-temp/" } =20 append_data() { diff --git a/gen_moddeps.sh b/gen_moddeps.sh index 5aeb84f..0867b56 100755 --- a/gen_moddeps.sh +++ b/gen_moddeps.sh @@ -59,9 +59,9 @@ gen_dep_list() if [ "${ALLRAMDISKMODULES}" =3D "1" ]; then strip_mod_paths $(find "${INSTALL_MOD_PATH}/lib/modules/${KV}" -name "= *$(modules_kext)") | sort else - local group_modules=09 + local group_modules rm -f ${TEMP}/moddeps > /dev/null -=09 + for group_modules in ${!MODULES_*}; do gen_deps ${!group_modules} done diff --git a/gen_package.sh b/gen_package.sh index a0a6bd0..e7c6142 100755 --- a/gen_package.sh +++ b/gen_package.sh @@ -28,7 +28,7 @@ gen_minkernpackage() { cp "${tmp_kernel_binary2}" "${TEMP}/minkernpackage/kernelz-${KV}" || = gen_die "Could not copy the kernelz for the min kernel package" fi fi -=09 + if ! isTrue "${INTEGRATED_INITRAMFS}" then [ "${BUILD_RAMDISK}" !=3D '0' ] && { cp "${TMPDIR}/initramfs-${KV}" "$= {TEMP}/minkernpackage/initramfs-${ARCH}-${KV}" || gen_die 'Could not copy= the initramfs for the kernel package!'; } @@ -40,8 +40,8 @@ gen_minkernpackage() { else cp "${KERNEL_DIR}/System.map" "${TEMP}/minkernpackage/System.map-${ARC= H}-${KV}" || gen_die 'Could not copy System.map for the kernel package!'; fi -=09 - cd "${TEMP}/minkernpackage"=20 + + cd "${TEMP}/minkernpackage" /bin/tar -jcpf ${MINKERNPACKAGE} * || gen_die 'Could not compress the k= ernel package!' cd "${TEMP}" && rm -rf "${TEMP}/minkernpackage" > /dev/null 2>&1 } @@ -84,27 +84,27 @@ gen_kerncache() then cp "${tmp_kernel_binary2}" "${TEMP}/kerncache/kernelz-${ARCH}-${KV}" |= | gen_die "Could not copy the kernelz for the kernel package" fi -=09 + echo "VERSION =3D ${VER}" > "${TEMP}/kerncache/kerncache.config" echo "PATCHLEVEL =3D ${PAT}" >> "${TEMP}/kerncache/kerncache.config" echo "SUBLEVEL =3D ${SUB}" >> "${TEMP}/kerncache/kerncache.config" echo "EXTRAVERSION =3D ${EXV}" >> "${TEMP}/kerncache/kerncache.config" -=09 + mkdir -p "${TEMP}/kerncache/lib/modules/" -=09 + if [ -d ${INSTALL_MOD_PATH}/lib/modules/${KV} ] then cp -r "${INSTALL_MOD_PATH}/lib/modules/${KV}" "${TEMP}/kerncache/li= b/modules" fi -=09 - cd "${TEMP}/kerncache"=20 + + cd "${TEMP}/kerncache" /bin/tar -jcpf ${KERNCACHE} * || gen_die 'Could not compress the kernel= package!' cd "${TEMP}" && rm -rf "${TEMP}/kerncache" > /dev/null 2>&1 } =20 gen_kerncache_extract_kernel() { - /bin/tar -f ${KERNCACHE} -C ${TEMP} -xj=20 + /bin/tar -f ${KERNCACHE} -C ${TEMP} -xj copy_image_with_preserve "kernel" \ "${TEMP}/kernel-${ARCH}-${KV}" \ "kernel-${KNAME}-${ARCH}-${KV}" @@ -115,7 +115,7 @@ gen_kerncache_extract_kernel() "${TEMP}/kernelz-${ARCH}-${KV}" \ "kernelz-${KNAME}-${ARCH}-${KV}" fi - =20 + copy_image_with_preserve "System.map" \ "${TEMP}/System.map-${ARCH}-${KV}" \ "System.map-${KNAME}-${ARCH}-${KV}" @@ -123,7 +123,7 @@ gen_kerncache_extract_kernel() =20 gen_kerncache_extract_modules() { - if [ -e "${KERNCACHE}" ]=20 + if [ -e "${KERNCACHE}" ] then print_info 1 'Extracting kerncache kernel modules' if [ "${INSTALL_MOD_PATH}" !=3D '' ] @@ -137,7 +137,7 @@ gen_kerncache_extract_modules() =20 gen_kerncache_extract_config() { - if [ -e "${KERNCACHE}" ]=20 + if [ -e "${KERNCACHE}" ] then print_info 1 'Extracting kerncache config to /etc/kernels' mkdir -p /etc/kernels @@ -156,13 +156,13 @@ gen_kerncache_is_valid() # Can make this more secure .... =20 /bin/tar -xj -f ${KERNCACHE} -C ${TEMP} - if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e ${TEMP}/kernel-${ARCH}-${KV= } ]=20 - then=20 + if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e ${TEMP}/kernel-${ARCH}-${KV= } ] + then print_info 1 'Valid kernel cache found; no sources will be used' KERNCACHE_IS_VALID=3D1 fi else - if [ -e "${KERNCACHE}" ]=20 + if [ -e "${KERNCACHE}" ] then KERNEL_CONFIG=3D"/${KERNEL_DIR}/.config" if [ "${CMD_KERNEL_CONFIG}" !=3D '' ] @@ -183,7 +183,6 @@ gen_kerncache_is_valid() test2=3D$(grep -v "^#" ${KERNEL_CONFIG} | md5sum | cut -d " " -f 1) if [ "${test1}" =3D=3D "${test2}" ] then -=09 echo print_info 1 "No kernel configuration change, skipping kernel build= ..." echo @@ -192,6 +191,6 @@ gen_kerncache_is_valid() fi fi fi - export KERNCACHE_IS_VALID=09 + export KERNCACHE_IS_VALID return 1 }