summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/initramfs/scripts/init16
1 files changed, 9 insertions, 7 deletions
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