summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Dummer <martin.dummer@gmx.net>2014-03-04 08:21:03 +0100
committerRichard Yao <ryao@gentoo.org>2014-03-15 20:25:24 -0400
commit3892338864a5afa3b720569cb3ab1bb2f9ab44bf (patch)
tree3ec1ad76c2aad451bbb65fa0153c59850ed103f9
parentfix broken function prompt_user() (diff)
downloadgenkernel-3892338864a5afa3b720569cb3ab1bb2f9ab44bf.tar.gz
genkernel-3892338864a5afa3b720569cb3ab1bb2f9ab44bf.tar.bz2
genkernel-3892338864a5afa3b720569cb3ab1bb2f9ab44bf.zip
Fix endless loop in gen_funcs.sh when LOGLEVEL is empty
When LOGLEVEL is unset or empty then genkernel loops endlessly in gen_funcs.sh. The solution is to set a proper default loglevel in $USRBIN/genkernel. Signed-off-by: Martin Dummer <martin.dummer@gmx.net> Signed-off-by: Richard Yao <ryao@gentoo.org>
-rwxr-xr-xgenkernel3
1 files changed, 3 insertions, 0 deletions
diff --git a/genkernel b/genkernel
index ff319f25..e5557912 100755
--- a/genkernel
+++ b/genkernel
@@ -36,6 +36,9 @@ done
_GENKERNEL_CONF=${CMD_GK_CONFIG:-/etc/genkernel.conf}
source "${_GENKERNEL_CONF}" || small_die "Could not read ${_GENKERNEL_CONF}"
+# set default LOGLEVEL if uninitialized
+LOGLEVEL=${LOGLEVEL:-1}
+
# Start sourcing other scripts
source ${GK_SHARE}/defaults/software.sh || small_die "Could not read ${GK_SHARE}/defaults/software.sh"
source ${GK_SHARE}/gen_funcs.sh || small_die "Could not read ${GK_SHARE}/gen_funcs.sh"