From 7be0b73a5e8bcae50ac0f81bb4a9bb91a363aee2 Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Sun, 8 Apr 2012 18:47:57 -0500 Subject: [PATCH] script/gentree: loader.conf may not exist; this is poorly advised, but acceptable --- script/gentree | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/gentree b/script/gentree index a135e56..bb5938c 100755 --- a/script/gentree +++ b/script/gentree @@ -239,7 +239,8 @@ do_imgboot() { ( cd "${sboot}/modules" && find . -name '*.ko' -o -name "${conf}" | cpio -p --link "${sroot}/modules" ) || chk # Remove all modules from the root fs that are preloaded by the preloader - cat "${sboot}/loader.conf" | grep '_load=' | sed -e 's#^\(.*\)_load=.*$#'"${sroot}/modules/"'\1.ko#' | xargs rm -f + [ ! -f "${sboot}/loader.conf" ] || cat "${sboot}/loader.conf" | grep '_load=' | \ + sed -e 's#^\(.*\)_load=.*$#'"${sroot}/modules/"'\1.ko#' | xargs rm -f # Remove all modules from the boot fs that are present in the root fs ( cd "${sroot}/modules" && ls -1 ) | sed -e 's#^#'"${sboot}/kernel/"'#' | xargs rm -f -- 2.42.0