summaryrefslogtreecommitdiff
path: root/packages/initrdscripts/files/98-aufs.sh
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2009-01-13 15:59:33 -0200
committerOtavio Salvador <otavio@ossystems.com.br>2009-01-13 16:04:47 -0200
commitb4d7f5021fa13e10d908aceb4855e1a378563c80 (patch)
tree84a2b934343d835b9373c377b77bc945e41b4bcd /packages/initrdscripts/files/98-aufs.sh
parent073800e6caec45843e88adfecf24098a3b83f034 (diff)
initramfs-module-aufs: add
This is used to make the aufs usage easier for initramfs users. It has been created by O.S. Systems.
Diffstat (limited to 'packages/initrdscripts/files/98-aufs.sh')
-rw-r--r--packages/initrdscripts/files/98-aufs.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/initrdscripts/files/98-aufs.sh b/packages/initrdscripts/files/98-aufs.sh
new file mode 100644
index 0000000000..df05418c57
--- /dev/null
+++ b/packages/initrdscripts/files/98-aufs.sh
@@ -0,0 +1,17 @@
+aufs_mount () {
+ modprobe -q aufs
+
+ mkdir $2 /mnt
+ mount -t aufs -o br:$1:$2 none /mnt
+}
+
+for arg in $CMDLINE; do
+ optarg=`expr "x$arg" : 'x[^=]*=\(.*\)'`
+ case $arg in
+ aufs=*)
+ rw=`expr "$optarg" : '\([^:]*\).*'`
+ ro=`expr "$optarg" : '[^:]*:\([^:]*\).*'`
+ aufs_mount $rw $ro
+ BOOT_ROOT=/mnt ;;
+ esac
+done