From e46aebfa38a4d521232fd35fc276a74b1ec2d7a5 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 7 Jan 2012 14:22:43 -0500 Subject: autodetect: try to find /usr partition fstype Signed-off-by: Dave Reisner --- install/autodetect | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'install') diff --git a/install/autodetect b/install/autodetect index abc0fa0..7f40b9c 100644 --- a/install/autodetect +++ b/install/autodetect @@ -3,6 +3,12 @@ build() { MODULE_FILE=$workdir/autodetect_modules + add_if_avail() { + if modinfo -k "$KERNELVERSION" "$1" &>/dev/null; then + printf '%s\n' "$1" >>"$MODULE_FILE" + fi + } + if [[ ! -d /sys/devices ]]; then error "/sys does not appear to be mounted. Unable to use autodetection" return 1 @@ -16,8 +22,11 @@ build() { fi # filesystem module might be a builtin - if modinfo -k "$KERNELVERSION" "$rootfstype" &>/dev/null; then - printf '%s\n' "$rootfstype" >>"$MODULE_FILE" + add_if_avail "$rootfstype" + + # detect separate /usr + if usrfstype=$(findmnt -nero fstype -s"$BASEDIR/etc/fstab" /usr); then + add_if_avail "$usrfstype" fi if (( UID == 0 )) || in_array 'disk' $(groups); then -- cgit v1.2.3-24-g4f1b