From 9e94550348a9bc523b7f31944b8b1806c70eacd9 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 4 Jul 2011 13:08:33 -0400 Subject: autodetect: check for /sys/devices before autodetecting Oops. Signed-off-by: Dave Reisner --- install/autodetect | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'install') diff --git a/install/autodetect b/install/autodetect index 7f22235..69619c0 100644 --- a/install/autodetect +++ b/install/autodetect @@ -3,13 +3,13 @@ build() { MODULE_FILE=$TMPDIR/autodetect_modules - auto_modules | grep -xEv '(ata|ide)_generic' >"$MODULE_FILE" - if [[ ! -d /sys/devices ]]; then error "/sys does not appear to be mounted. Unable to use autodetection" return 1 fi + auto_modules | grep -xEv '(ata|ide)_generic' >"$MODULE_FILE" + if ! findmnt -uno fstype "${BASEDIR:-/}" >>"$MODULE_FILE"; then error "failed to detect root filesystem" fs_autodetect_failed=1 -- cgit v1.2.3-24-g4f1b