Add append_fuse() and append_unionfs_fuse() functions
authoragaffney <agaffney@kagome.(none)>
Wed, 12 Nov 2008 21:05:35 +0000 (15:05 -0600)
committeragaffney <agaffney@kagome.(none)>
Wed, 12 Nov 2008 21:05:35 +0000 (15:05 -0600)
ChangeLog
gen_initramfs.sh

index 21b38c58f388ae8dc6fd5e25200bbc6e5ba91570..6b611200f4e8e4042dd36d0e52f11601b416a190 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
 # Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney
 # Distributed under the GPL v2
 
+  12 Nov 2008; Andrew Gaffney <agaffney@gentoo.org> gen_initramfs.sh:
+  Add append_fuse() and append_unionfs_fuse() functions
+
   12 Nov 2008; Andrew Gaffney <agaffney@gentoo.org> gen_compile.sh:
   Add compile_fuse() and compile_unionfs_fuse()
 
index f8cffb1418eef37f08e173a73009e64270bda271..bd0ddf1fb6acfd645f5e587d097a0914e4fae8c1 100644 (file)
@@ -72,6 +72,33 @@ append_blkid(){
        rm -rf "${TEMP}/initramfs-blkid-temp" > /dev/null
 }
 
+append_fuse() {
+       if [ -d "${TEMP}/initramfs-fuse-temp" ]
+       then
+               rm -r "${TEMP}/initramfs-fuse-temp"
+       fi
+       cd ${TEMP}
+       mkdir -p "${TEMP}/initramfs-fuse-temp/lib/"
+       tar -C "${TEMP}/initramfs-fuse-temp/lib/" -xjf "${FUSE_BINCACHE}"
+       cd "${TEMP}/initramfs-fuse-temp/"
+       find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
+       rm -rf "${TEMP}/initramfs-fuse-temp" > /dev/null
+}
+
+append_unionfs_fuse() {
+       if [ -d "${TEMP}/initramfs-unionfs-fuse-temp" ]
+       then
+               rm -r "${TEMP}/initramfs-unionfs-fuse-temp"
+       fi
+       cd ${TEMP}
+       mkdir -p "${TEMP}/initramfs-unionfs-fuse-temp/bin/"
+       bzip2 -dc "${UNIONFS_FUSE_BINCACHE}" > "${TEMP}/initramfs-uniwonfs-fuse-temp/bin/unionfs" ||
+               gen_die 'Could not extract unionfs-fuse binary cache!'
+       cd "${TEMP}/initramfs-unionfs-fuse-temp/"
+       find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
+       rm -rf "${TEMP}/initramfs-unionfs-fuse-temp" > /dev/null
+}
+
 #append_suspend(){
 #      if [ -d "${TEMP}/initramfs-suspend-temp" ];
 #      then
@@ -477,6 +504,9 @@ create_initramfs() {
 
        append_data 'blkid' "${DISKLABEL}"
 
+       append_data 'fuse'
+       append_data 'unionfs_fuse'
+
        if isTrue "${SPLASH}"
        then
                append_data 'splash' "${SPLASH}"