return 1
}
-setColorVars() {
+setColorVars() {
if isTrue ${USECOLOR}
then
GOOD=$'\e[32;01m'
DEBUGCACHE="${DEBUGCACHE}${STR}"
else
echo -ne "${STR}" >> ${LOGFILE}
- fi
+ fi
else
if [ "${TODEBUGCACHE}" = '1' ]; then
DEBUGCACHE="${DEBUGCACHE}${STR}"$'\n'
# in the later sed expression
local SAFE_VAR
SAFE_VAR=`echo "${2}" | sed -e 's/\([\/\.]\)/\\\\\\1/g'`
-
+
echo "${3}" | sed -e "s/%%${1}%%/${SAFE_VAR}/g" -
}
var_replace "ARCH" "${ARCH}" "${1}"
}
-kv_replace() {
- var_replace "KV" "${KV}" "${1}"
-}
-
cache_replace() {
var_replace "CACHE" "${CACHE_DIR}" "${1}"
}
if [ -f "${LOGFILE}" ]
then
(echo > "${LOGFILE}") 2>/dev/null || small_die "Genkernel: Could not write to ${LOGFILE}."
- fi
+ fi
}
gen_die() {
do
print_info 1 " >> removing ${i}"
rm "${i}"
- done < <(find "${CACHE_DIR}" -maxdepth 1 -type f -name '*.tar.*')
+ done < <(find "${CACHE_DIR}" -maxdepth 1 -type f -name '*.tar.*' -o -name '*.bz2')
fi
}
clear_tmpdir()
{
-if ! isTrue ${CMD_NOINSTALL}
+if isTrue ${CMD_INSTALL}
then
TMPDIR_CONTENTS=`ls ${TMPDIR}`
print_info 1 "Removing tmp dir contents"
rm ${TMPDIR}/${i}
done
fi
-}
+}
#
# Function to copy various kernel boot image products to the boot directory,
# Syntax check the function arguments.
#
case "$VarType" in
- 1|2)
+ BOOL|STRING)
;;
*)
gen_die "Illegal variable type \"$VarType\" passed to set_config_with_override()."
fi
fi
- if [ "${VarType}" = "1" ]
+ if [ "${VarType}" = BOOL ]
then
if isTrue "${Result}"
then
}
check_distfiles() {
- for i in $BUSYBOX_SRCTAR $DEVICE_MAPPER_SRCTAR $MULTIPATH_SRCTAR $LVM_SRCTAR $DMRAID_SRCTAR $E2FSPROGS_SRCTAR $ISCSI_SRCTAR
+ for i in $BUSYBOX_SRCTAR $DEVICE_MAPPER_SRCTAR $MULTIPATH_SRCTAR $LVM_SRCTAR $DMRAID_SRCTAR $E2FSPROGS_SRCTAR $ISCSI_SRCTAR $GPG_SRCTAR
do
if [ ! -f "${i}" ]
then