4 compile_kernel_args() {
8 if [ "${KERNEL_CROSS_COMPILE}" != '' ]
10 ARGS="${ARGS} CROSS_COMPILE=\"${KERNEL_CROSS_COMPILE}\""
12 if [ "${KERNEL_CC}" != '' ]
14 ARGS="CC=\"${KERNEL_CC}\""
16 if [ "${KERNEL_LD}" != '' ]
18 ARGS="${ARGS} LD=\"${KERNEL_LD}\""
20 if [ "${KERNEL_AS}" != '' ]
22 ARGS="${ARGS} AS=\"${KERNEL_AS}\""
24 if [ -n "${KERNEL_ARCH}" ]
26 ARGS="${ARGS} ARCH=\"${KERNEL_ARCH}\""
37 if [ -n "${UTILS_CROSS_COMPILE}" ]
39 UTILS_CC="${UTILS_CROSS_COMPILE}gcc"
40 UTILS_LD="${UTILS_CROSS_COMPILE}ld"
41 UTILS_AS="${UTILS_CROSS_COMPILE}as"
44 if [ "${UTILS_ARCH}" != '' ]
46 ARGS="ARCH=\"${UTILS_ARCH}\""
48 if [ "${UTILS_CC}" != '' ]
50 ARGS="CC=\"${UTILS_CC}\""
52 if [ "${UTILS_LD}" != '' ]
54 ARGS="${ARGS} LD=\"${UTILS_LD}\""
56 if [ "${UTILS_AS}" != '' ]
58 ARGS="${ARGS} AS=\"${UTILS_AS}\""
67 if [ "${UTILS_ARCH}" != '' ]
69 export ARCH="${UTILS_ARCH}"
71 if [ "${UTILS_CC}" != '' ]
73 export CC="${UTILS_CC}"
75 if [ "${UTILS_LD}" != '' ]
77 export LD="${UTILS_LD}"
79 if [ "${UTILS_AS}" != '' ]
81 export AS="${UTILS_AS}"
87 if [ "${UTILS_ARCH}" != '' ]
91 if [ "${UTILS_CC}" != '' ]
95 if [ "${UTILS_LD}" != '' ]
99 if [ "${UTILS_AS}" != '' ]
108 if [ "${KERNEL_CC}" != '' ]
110 export CC="${KERNEL_CC}"
112 if [ "${KERNEL_LD}" != '' ]
114 export LD="${KERNEL_LD}"
116 if [ "${KERNEL_AS}" != '' ]
118 export AS="${KERNEL_AS}"
120 if [ "${KERNEL_CROSS_COMPILE}" != '' ]
122 export CROSS_COMPILE="${KERNEL_CROSS_COMPILE}"
128 if [ "${KERNEL_CC}" != '' ]
132 if [ "${KERNEL_LD}" != '' ]
136 if [ "${KERNEL_AS}" != '' ]
140 if [ "${KERNEL_CROSS_COMPILE}" != '' ]
147 if [ "${ARCH}" != '' ]
149 export ORIG_ARCH="${ARCH}"
153 export ORIG_CC="${CC}"
157 export ORIG_LD="${LD}"
161 export ORIG_AS="${AS}"
163 if [ "${CROSS_COMPILE}" != '' ]
165 export ORIG_CROSS_COMPILE="${CROSS_COMPILE}"
170 if [ "${ORIG_ARCH}" != '' ]
172 export ARCH="${ORIG_ARCH}"
175 if [ "${ORIG_CC}" != '' ]
177 export CC="${ORIG_CC}"
180 if [ "${ORIG_LD}" != '' ]
182 export LD="${ORIG_LD}"
185 if [ "${ORIG_AS}" != '' ]
187 export AS="${ORIG_AS}"
190 if [ "${ORIG_CROSS_COMPILE}" != '' ]
192 export CROSS_COMPILE="${ORIG_CROSS_COMPILE}"
193 unset ORIG_CROSS_COMPILE
201 if [ -d "${GK_SHARE}/patches/${util}/${version}" ]
203 print_info 1 "${util}: >> Applying patches..."
204 for i in ${GK_SHARE}/patches/${util}/${version}/*{diff,patch}
209 patch -p${j} --backup-if-mismatch -f < "${i}" >/dev/null
216 if [ ${patch_success} != 1 ]
218 gen_die "could not apply patch ${i} for ${util}-${version}"
227 gen_die 'compile_generic(): improper usage!'
231 if [ "${argstype}" = 'kernel' ] || [ "${argstype}" = 'runtask' ]
235 elif [ "${2}" = 'utils' ]
240 case "${argstype}" in
241 kernel) ARGS="`compile_kernel_args`" ;;
242 utils) ARGS="`compile_utils_args`" ;;
243 *) ARGS="" ;; # includes runtask
247 # the eval usage is needed in the next set of code
248 # as ARGS can contain spaces and quotes, eg:
249 # ARGS='CC="ccache gcc"'
250 if [ "${argstype}" == 'runtask' ]
252 print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS/-j?/j1} ${ARGS} ${target} $*" 1 0 1
253 eval ${MAKE} -s ${MAKEOPTS/-j?/-j1} "${ARGS}" ${target} $*
255 elif [ "${LOGLEVEL}" -gt "1" ]
257 # Output to stdout and logfile
258 print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS} ${ARGS} ${target} $*" 1 0 1
259 eval ${MAKE} ${MAKEOPTS} ${ARGS} ${target} $* 2>&1 | tee -a ${LOGFILE}
262 # Output to logfile only
263 print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS} ${ARGS} ${1} $*" 1 0 1
264 eval ${MAKE} ${MAKEOPTS} ${ARGS} ${target} $* >> ${LOGFILE} 2>&1
267 [ "${RET}" -ne '0' ] &&
268 gen_die "Failed to compile the \"${target}\" target..."
272 if [ "${argstype}" = 'kernel' ]
275 elif [ "${argstype}" = 'utils' ]
282 print_info 1 " >> Compiling ${KV} modules..."
284 compile_generic modules kernel
285 export UNAME_MACHINE="${ARCH}"
286 [ "${INSTALL_MOD_PATH}" != '' ] && export INSTALL_MOD_PATH
287 compile_generic "modules_install" kernel
292 [ "${KERNEL_MAKE}" = '' ] &&
293 gen_die "KERNEL_MAKE undefined - I don't know how to compile a kernel for this arch!"
295 print_info 1 " >> Compiling ${KV} ${KERNEL_MAKE_DIRECTIVE/_install/ [ install ]/}..."
296 compile_generic "${KERNEL_MAKE_DIRECTIVE}" kernel
297 if [ "${KERNEL_MAKE_DIRECTIVE_2}" != '' ]
299 print_info 1 " >> Starting supplimental compile of ${KV}: ${KERNEL_MAKE_DIRECTIVE_2}..."
300 compile_generic "${KERNEL_MAKE_DIRECTIVE_2}" kernel
303 local tmp_kernel_binary=$(find_kernel_binary ${KERNEL_BINARY})
304 local tmp_kernel_binary2=$(find_kernel_binary ${KERNEL_BINARY_2})
305 if [ -z "${tmp_kernel_binary}" ]
307 gen_die "Cannot locate kernel binary"
310 if ! isTrue "${CMD_NOINSTALL}"
312 copy_image_with_preserve "kernel" \
313 "${tmp_kernel_binary}" \
314 "kernel-${KNAME}-${ARCH}-${KV}"
316 copy_image_with_preserve "System.map" \
318 "System.map-${KNAME}-${ARCH}-${KV}"
320 if isTrue "${GENZIMAGE}"
322 copy_image_with_preserve "kernelz" \
323 "${tmp_kernel_binary2}" \
327 cp "${tmp_kernel_binary}" "${TMPDIR}/kernel-${KNAME}-${ARCH}-${KV}" ||
328 gen_die "Could not copy the kernel binary to ${TMPDIR}!"
329 cp "System.map" "${TMPDIR}/System.map-${KNAME}-${ARCH}-${KV}" ||
330 gen_die "Could not copy System.map to ${TMPDIR}!"
331 if isTrue "${GENZIMAGE}"
333 cp "${tmp_kernel_binary2}" "${TMPDIR}/kernelz-${KV}" ||
334 gen_die "Could not copy the kernelz binary to ${TMPDIR}!"
340 [ -f "${BUSYBOX_SRCTAR}" ] ||
341 gen_die "Could not find busybox source tarball: ${BUSYBOX_SRCTAR}!"
343 if [ -n "${BUSYBOX_CONFIG}" ]
345 [ -f "${BUSYBOX_CONFIG}" ] ||
346 gen_die "Could not find busybox config file: ${BUSYBOX_CONFIG}"
347 elif isTrue "${NETBOOT}" && [ -f "$(arch_replace "${GK_SHARE}/arch/%%ARCH%%/netboot-busy-config")" ]
349 BUSYBOX_CONFIG="$(arch_replace "${GK_SHARE}/arch/%%ARCH%%/netboot-busy-config")"
350 elif isTrue "${NETBOOT}" && [ -f "${GK_SHARE}/netboot/busy-config" ]
352 BUSYBOX_CONFIG="${GK_SHARE}/netboot/busy-config"
353 elif [ -f "$(arch_replace "${GK_SHARE}/arch/%%ARCH%%/busy-config")" ]
355 BUSYBOX_CONFIG="$(arch_replace "${GK_SHARE}/arch/%%ARCH%%/busy-config")"
356 elif [ -f "${GK_SHARE}/defaults/busy-config" ]
358 BUSYBOX_CONFIG="${GK_SHARE}/defaults/busy-config"
360 gen_die "Could not find a busybox config file"
363 # Delete cache if stored config's MD5 does not match one to be used
364 if [ -f "${BUSYBOX_BINCACHE}" ]
366 oldconfig_md5=$(tar -xjf "${BUSYBOX_BINCACHE}" -O .config.gk_orig 2>/dev/null | md5sum)
367 newconfig_md5=$(md5sum < "${BUSYBOX_CONFIG}")
368 if [ "${oldconfig_md5}" != "${newconfig_md5}" ]
370 print_info 1 "busybox: >> Removing stale cache..."
371 rm -rf "${BUSYBOX_BINCACHE}"
373 print_info 1 "busybox: >> Using cache"
377 if [ ! -f "${BUSYBOX_BINCACHE}" ]
380 rm -rf "${BUSYBOX_DIR}" > /dev/null
381 /bin/tar -jxpf ${BUSYBOX_SRCTAR} ||
382 gen_die 'Could not extract busybox source tarball!'
383 [ -d "${BUSYBOX_DIR}" ] ||
384 gen_die 'Busybox directory ${BUSYBOX_DIR} is invalid!'
385 cp "${BUSYBOX_CONFIG}" "${BUSYBOX_DIR}/.config"
386 cp "${BUSYBOX_CONFIG}" "${BUSYBOX_DIR}/.config.gk_orig"
388 apply_patches busybox ${BUSYBOX_VER}
389 print_info 1 'busybox: >> Configuring...'
390 yes '' 2>/dev/null | compile_generic oldconfig utils
392 print_info 1 'busybox: >> Compiling...'
393 compile_generic all utils
394 print_info 1 'busybox: >> Copying to cache...'
395 [ -f "${TEMP}/${BUSYBOX_DIR}/busybox" ] ||
396 gen_die 'Busybox executable does not exist!'
397 strip "${TEMP}/${BUSYBOX_DIR}/busybox" ||
398 gen_die 'Could not strip busybox binary!'
399 tar -cj -C "${TEMP}/${BUSYBOX_DIR}" -f "${BUSYBOX_BINCACHE}" busybox .config .config.gk_orig ||
400 gen_die 'Could not create the busybox bincache!'
403 rm -rf "${BUSYBOX_DIR}" > /dev/null
408 compile_device_mapper
409 if [ ! -f "${LVM_BINCACHE}" ]
411 [ -f "${LVM_SRCTAR}" ] ||
412 gen_die "Could not find LVM source tarball: ${LVM_SRCTAR}! Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
414 rm -rf ${LVM_DIR} > /dev/null
415 /bin/tar -zxpf ${LVM_SRCTAR} ||
416 gen_die 'Could not extract LVM source tarball!'
417 [ -d "${LVM_DIR}" ] ||
418 gen_die 'LVM directory ${LVM_DIR} is invalid!'
419 rm -rf "${TEMP}/device-mapper" > /dev/null
420 /bin/tar -jxpf "${DEVICE_MAPPER_BINCACHE}" -C "${TEMP}" ||
421 gen_die "Could not extract device-mapper binary cache!";
424 print_info 1 'lvm: >> Configuring...'
425 LDFLAGS="-L${TEMP}/device-mapper/lib" \
426 CFLAGS="-I${TEMP}/device-mapper/include" \
427 CPPFLAGS="-I${TEMP}/device-mapper/include" \
428 ./configure --enable-static_link --prefix=${TEMP}/lvm >> ${LOGFILE} 2>&1 ||
429 gen_die 'Configure of lvm failed!'
430 print_info 1 'lvm: >> Compiling...'
431 compile_generic '' utils
432 compile_generic 'install' utils
435 print_info 1 ' >> Copying to bincache...'
436 strip "sbin/lvm.static" ||
437 gen_die 'Could not strip lvm.static!'
438 /bin/tar -cjf "${LVM_BINCACHE}" sbin/lvm.static ||
439 gen_die 'Could not create binary cache'
442 rm -rf "${TEMP}/device-mapper" > /dev/null
443 rm -rf "${LVM_DIR}" lvm
448 compile_device_mapper
449 if [ ! -f "${DMRAID_BINCACHE}" ]
451 [ -f "${DMRAID_SRCTAR}" ] ||
452 gen_die "Could not find DMRAID source tarball: ${DMRAID_SRCTAR}! Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
454 rm -rf ${DMRAID_DIR} > /dev/null
455 /bin/tar -jxpf ${DMRAID_SRCTAR} ||
456 gen_die 'Could not extract DMRAID source tarball!'
457 [ -d "${DMRAID_DIR}" ] ||
458 gen_die 'DMRAID directory ${DMRAID_DIR} is invalid!'
459 rm -rf "${TEMP}/device-mapper" > /dev/null
460 /bin/tar -jxpf "${DEVICE_MAPPER_BINCACHE}" -C "${TEMP}" ||
461 gen_die "Could not extract device-mapper binary cache!";
464 print_info 1 'dmraid: >> Configuring...'
466 LDFLAGS="-L${TEMP}/device-mapper/lib" \
467 CFLAGS="-I${TEMP}/device-mapper/include" \
468 CPPFLAGS="-I${TEMP}/device-mapper/include" \
469 ./configure --enable-static_link --prefix=${TEMP}/dmraid >> ${LOGFILE} 2>&1 ||
470 gen_die 'Configure of dmraid failed!'
472 # We dont necessarily have selinux installed yet... look into
473 # selinux global support in the future.
474 sed -i tools/Makefile -e "s|DMRAIDLIBS += -lselinux||g"
475 ###echo "DMRAIDLIBS += -lselinux -lsepol" >> tools/Makefile
476 mkdir -p "${TEMP}/dmraid"
477 print_info 1 'dmraid: >> Compiling...'
478 # Force dmraid to be built with -j1 for bug #188273
479 MAKEOPTS=-j1 compile_generic '' utils
480 #compile_generic 'install' utils
481 mkdir ${TEMP}/dmraid/sbin
482 install -m 0755 -s tools/dmraid "${TEMP}/dmraid/sbin/dmraid"
483 print_info 1 ' >> Copying to bincache...'
485 /bin/tar -cjf "${DMRAID_BINCACHE}" sbin/dmraid ||
486 gen_die 'Could not create binary cache'
489 rm -rf "${TEMP}/device-mapper" > /dev/null
490 rm -rf "${DMRAID_DIR}" dmraid
494 compile_device_mapper() {
495 if [ ! -f "${DEVICE_MAPPER_BINCACHE}" ]
497 [ ! -f "${DEVICE_MAPPER_SRCTAR}" ] &&
498 gen_die "Could not find device-mapper source tarball: ${DEVICE_MAPPER_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
500 rm -rf "${DEVICE_MAPPER_DIR}"
501 /bin/tar -zxpf "${DEVICE_MAPPER_SRCTAR}"
502 [ ! -d "${DEVICE_MAPPER_DIR}" ] &&
503 gen_die "device-mapper directory ${DEVICE_MAPPER_DIR} invalid"
504 cd "${DEVICE_MAPPER_DIR}"
505 ./configure --prefix=${TEMP}/device-mapper --enable-static_link \
506 --disable-selinux >> ${LOGFILE} 2>&1 ||
507 gen_die 'Configuring device-mapper failed!'
508 print_info 1 'device-mapper: >> Compiling...'
509 compile_generic '' utils
510 compile_generic 'install' utils
511 print_info 1 ' >> Copying to cache...'
513 rm -rf "${TEMP}/device-mapper/man" ||
514 gen_die 'Could not remove manual pages!'
515 strip "${TEMP}/device-mapper/sbin/dmsetup" ||
516 gen_die 'Could not strip dmsetup binary!'
517 /bin/tar -jcpf "${DEVICE_MAPPER_BINCACHE}" device-mapper ||
518 gen_die 'Could not tar up the device-mapper binary!'
519 [ -f "${DEVICE_MAPPER_BINCACHE}" ] ||
520 gen_die 'device-mapper cache not created!'
522 rm -rf "${DEVICE_MAPPER_DIR}" > /dev/null
523 rm -rf "${TEMP}/device-mapper" > /dev/null
527 compile_e2fsprogs() {
528 if [ ! -f "${BLKID_BINCACHE}" ]
530 [ ! -f "${E2FSPROGS_SRCTAR}" ] &&
531 gen_die "Could not find e2fsprogs source tarball: ${E2FSPROGS_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
533 rm -rf "${E2FSPROGS_DIR}"
534 tar -zxpf "${E2FSPROGS_SRCTAR}"
535 [ ! -d "${E2FSPROGS_DIR}" ] &&
536 gen_die "e2fsprogs directory ${E2FSPROGS_DIR} invalid"
537 cd "${E2FSPROGS_DIR}"
538 print_info 1 'e2fsprogs: >> Configuring...'
539 ./configure --with-ldopts=-static >> ${LOGFILE} 2>&1 ||
540 gen_die 'Configuring e2fsprogs failed!'
541 print_info 1 'e2fsprogs: >> Compiling...'
542 MAKE=${UTILS_MAKE} compile_generic "" ""
543 print_info 1 'blkid: >> Copying to cache...'
544 [ -f "${TEMP}/${E2FSPROGS_DIR}/misc/blkid" ] ||
545 gen_die 'Blkid executable does not exist!'
546 strip "${TEMP}/${E2FSPROGS_DIR}/misc/blkid" ||
547 gen_die 'Could not strip blkid binary!'
548 bzip2 "${TEMP}/${E2FSPROGS_DIR}/misc/blkid" ||
549 gen_die 'bzip2 compression of blkid failed!'
550 mv "${TEMP}/${E2FSPROGS_DIR}/misc/blkid.bz2" "${BLKID_BINCACHE}" ||
551 gen_die 'Could not copy the blkid binary to the package directory, does the directory exist?'
554 rm -rf "${E2FSPROGS_DIR}" > /dev/null
559 if [ ! -f "${FUSE_BINCACHE}" ]
561 [ ! -f "${FUSE_SRCTAR}" ] &&
562 gen_die "Could not find fuse source tarball: ${FUSE_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
565 tar -zxpf "${FUSE_SRCTAR}"
566 [ ! -d "${FUSE_DIR}" ] &&
567 gen_die "fuse directory ${FUSE_DIR} invalid"
569 print_info 1 'fuse: >> Configuring...'
570 ./configure --disable-kernel-module --disable-example >> ${LOGFILE} 2>&1 ||
571 gen_die 'Configuring fuse failed!'
572 print_info 1 'fuse: >> Compiling...'
573 MAKE=${UTILS_MAKE} compile_generic "" ""
575 # Since we're linking statically against libfuse, we don't need to cache the .so
576 # print_info 1 'libfuse: >> Copying to cache...'
577 # [ -f "${TEMP}/${FUSE_DIR}/lib/.libs/libfuse.so" ] ||
578 # gen_die 'libfuse.so does not exist!'
579 # strip "${TEMP}/${FUSE_DIR}/lib/.libs/libfuse.so" ||
580 # gen_die 'Could not strip libfuse.so!'
581 # cd "${TEMP}/${FUSE_DIR}/lib/.libs"
582 # tar -cjf "${FUSE_BINCACHE}" libfuse*so* ||
583 # gen_die 'Could not create fuse bincache!'
586 # rm -rf "${FUSE_DIR}" > /dev/null
590 compile_unionfs_fuse() {
591 if [ ! -f "${UNIONFS_FUSE_BINCACHE}" ]
594 # We'll call compile_fuse() from here, since it's not needed directly by anything else
597 [ ! -f "${UNIONFS_FUSE_SRCTAR}" ] &&
598 gen_die "Could not find unionfs-fuse source tarball: ${UNIONFS_FUSE_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
600 rm -rf "${UNIONFS_FUSE_DIR}"
601 tar -jxpf "${UNIONFS_FUSE_SRCTAR}"
602 [ ! -d "${UNIONFS_FUSE_DIR}" ] &&
603 gen_die "unionfs-fuse directory ${UNIONFS_FUSE_DIR} invalid"
604 cd "${UNIONFS_FUSE_DIR}"
605 print_info 1 'unionfs-fuse: >> Compiling...'
606 sed -i "/^\(CFLAGS\|CPPFLAGS\)/s:^\\(.*\\)$:\\1 -static -I${TEMP}/${FUSE_DIR}/include -L${TEMP}/${FUSE_DIR}/lib/.libs:" Makefile src/Makefile
607 sed -i "/^LIB = /s:^LIB = \(.*\)$:LIB = -static -L${TEMP}/${FUSE_DIR}/lib/.libs \1 -ldl -lrt:" Makefile src/Makefile
608 MAKE=${UTILS_MAKE} compile_generic "" ""
609 print_info 1 'unionfs-fuse: >> Copying to cache...'
610 [ -f "${TEMP}/${UNIONFS_FUSE_DIR}/src/unionfs" ] ||
611 gen_die 'unionfs binary does not exist!'
612 strip "${TEMP}/${UNIONFS_FUSE_DIR}/src/unionfs" ||
613 gen_die 'Could not strip unionfs binary!'
614 bzip2 "${TEMP}/${UNIONFS_FUSE_DIR}/src/unionfs" ||
615 gen_die 'bzip2 compression of unionfs binary failed!'
616 mv "${TEMP}/${UNIONFS_FUSE_DIR}/src/unionfs.bz2" "${UNIONFS_FUSE_BINCACHE}" ||
617 gen_die 'Could not copy the unionfs binary to the package directory, does the directory exist?'
620 rm -rf "${UNIONFS_FUSE_DIR}" > /dev/null
625 if [ ! -f "${ISCSI_BINCACHE}" ]
627 [ ! -f "${ISCSI_SRCTAR}" ] &&
628 gen_die "Could not find iSCSI source tarball: ${ISCSI_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
630 rm -rf "${ISCSI_DIR}"
631 tar -zxpf "${ISCSI_SRCTAR}"
632 [ ! -d "${ISCSI_DIR}" ] &&
633 gen_die "ISCSI directory ${ISCSI_DIR} invalid"
634 print_info 1 'iSCSI: >> Compiling...'
635 cd "${TEMP}/${ISCSI_DIR}"
637 # Only build userspace
638 MAKE=${UTILS_MAKE} compile_generic "user" ""
640 # if kernel modules exist, copy them to initramfs, otherwise it will be compiled into the kernel
641 mkdir -p "${TEMP}/initramfs-iscsi-temp/lib/modules/${RELEASE}/kernel/drivers/scsi/"
642 for modname in iscsi_tcp libiscsi scsi_transport_iscsi
644 if [ -e "${CMD_KERNEL_DIR}/drivers/scsi/${modname}.ko" ]
646 cp ${CMD_KERNEL_DIR}/drivers/scsi/${modname}.ko "${TEMP}/initramfs-iscsi-temp/lib/modules/${RELEASE}/kernel/drivers/scsi/"
650 cd "${TEMP}/initramfs-iscsi-temp/"
651 print_info 1 'iscsistart: >> Copying to cache...'
652 [ -f "${TEMP}/${ISCSI_DIR}/usr/iscsistart" ] ||
653 gen_die 'iscsistart executable does not exist!'
654 strip "${TEMP}/${ISCSI_DIR}/usr/iscsistart" ||
655 gen_die 'Could not strip iscsistart binary!'
656 bzip2 "${TEMP}/${ISCSI_DIR}/usr/iscsistart" ||
657 gen_die 'bzip2 compression of iscsistart failed!'
658 mv "${TEMP}/${ISCSI_DIR}/usr/iscsistart.bz2" "${ISCSI_BINCACHE}" ||
659 gen_die 'Could not copy the iscsistart binary to the package directory, does the directory exist?'
662 rm -rf "${ISCSI_DIR}" > /dev/null