From b4d7f5021fa13e10d908aceb4855e1a378563c80 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Tue, 13 Jan 2009 15:59:33 -0200 Subject: initramfs-module-aufs: add This is used to make the aufs usage easier for initramfs users. It has been created by O.S. Systems. --- packages/initrdscripts/files/98-aufs.sh | 17 +++++++++++++++++ packages/initrdscripts/initramfs-module-aufs_1.0.bb | 12 ++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 packages/initrdscripts/files/98-aufs.sh create mode 100644 packages/initrdscripts/initramfs-module-aufs_1.0.bb (limited to 'packages/initrdscripts') 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 diff --git a/packages/initrdscripts/initramfs-module-aufs_1.0.bb b/packages/initrdscripts/initramfs-module-aufs_1.0.bb new file mode 100644 index 0000000000..aa31ceee36 --- /dev/null +++ b/packages/initrdscripts/initramfs-module-aufs_1.0.bb @@ -0,0 +1,12 @@ +SRC_URI = "file://98-aufs.sh" +PR = "r1" +DESCRIPTION = "An initramfs module for mount aufs." +RDEPENDS = "initramfs-uniboot aufs" + +do_install() { + install -d ${D}/initrd.d + install -m 0755 ${WORKDIR}/98-aufs.sh ${D}/initrd.d/ +} + +PACKAGE_ARCH = "all" +FILES_${PN} += " /initrd.d/* " -- cgit v1.2.3