From: W. Trevor King Date: Sat, 9 Feb 2013 20:45:38 +0000 (-0500) Subject: kmerge.sh: Make /var/tmp/${clst_kname}.config optional X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9ceebbf;p=catalyst.git kmerge.sh: Make /var/tmp/${clst_kname}.config optional For users that don't want to specify a seed config. Reviewed-by: Matt Turner --- diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh index b7313738..ce1dddff 100644 --- a/targets/support/kmerge.sh +++ b/targets/support/kmerge.sh @@ -109,8 +109,11 @@ genkernel_compile(){ else genkernel ${GK_ARGS} || exit 1 fi - md5sum /var/tmp/${clst_kname}.config | awk '{print $1}' > \ - /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG + if [ -e /var/tmp/${clst_kname}.config ] + then + md5sum /var/tmp/${clst_kname}.config | awk '{print $1}' > \ + /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG + fi } build_kernel() { @@ -177,15 +180,17 @@ then fi CONFIG_MATCH=0 -if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG ] +if [ -n "${clst_KERNCACHE}" -a + -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG ] then - STR1=`cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG` - STR2=`md5sum /var/tmp/${clst_kname}.config|awk '{print $1}'` - if [ "${STR1}" = "${STR2}" ] + if [ ! -e /var/tmp/${clst_kname}.config ] then - if [ -n "${clst_KERNCACHE}" ] + CONFIG_MATCH=1 + else + STR1=`cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG` + STR2=`md5sum /var/tmp/${clst_kname}.config|awk '{print $1}'` + if [ "${STR1}" = "${STR2}" ] then - #echo "CONFIG match" CONFIG_MATCH=1 fi fi