From 2cad801bc4aa45884616669ce418eaa21a82861a Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Wed, 11 May 2011 19:32:47 +0200 Subject: AUFS/UnionFS(?) might be compiled into the kernel already ... --- src/initramfs/scripts/init | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/initramfs/scripts/init b/src/initramfs/scripts/init index 7f92067b..bd5e959b 100755 --- a/src/initramfs/scripts/init +++ b/src/initramfs/scripts/init @@ -1,6 +1,6 @@ #!/bin/sh # Copyright (c) 2003..2006 - RZ Uni Freiburg -# Copyright (c) 2006..2010 - OpenSLX GmbH +# Copyright (c) 2006..2011 - OpenSLX GmbH # # This program is free software distributed under the GPL version 2. # See http://openslx.org/COPYING @@ -719,15 +719,17 @@ fi runinithook '40-started-hw-config' -# unionfs/aufs modules visible by now if installed, try to use aufs for rw -# access if available +# unionfs/aufs modules visible by now if installed or directly compiled into +# the kernel, try to use aufs for rw access if available union_type="" if [ ${aufs} -eq 1 ] && \ - modprobe ${MODPRV} aufs 2>/dev/null && \ - lsmod | grep -qe "^aufs" ; then union_type="AUFS" + grep -q aufs /proc/filesystems || \ + { modprobe ${MODPRV} aufs 2>/dev/null && \ + lsmod | grep -qe "^aufs" ; } ; then union_type="AUFS" elif [ ${unionfs} -eq 1 ] && \ - modprobe ${MODPRV} unionfs 2>/dev/null && \ - lsmod | grep -qe "^unionfs" ; then union_type="UnionFS" + grep -q aufs /proc/filesystems || \ + { modprobe ${MODPRV} unionfs 2>/dev/null && \ + lsmod | grep -qe "^unionfs" ; } ; then union_type="UnionFS" elif [ ${aufs} -eq 0 -a ${unionfs} -eq 0 -a -z "${cowloop}" ] ; then error "$init_deselau" nonfatal unset aufs unionfs -- cgit v1.2.3-55-g7522