From 28a88bc9538021a46c968c78fb59c776be132df8 Mon Sep 17 00:00:00 2001 From: agaffney Date: Wed, 12 Nov 2008 15:05:35 -0600 Subject: [PATCH] Add append_fuse() and append_unionfs_fuse() functions --- ChangeLog | 3 +++ gen_initramfs.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/ChangeLog b/ChangeLog index 21b38c5..6b61120 100644 --- 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 gen_initramfs.sh: + Add append_fuse() and append_unionfs_fuse() functions + 12 Nov 2008; Andrew Gaffney gen_compile.sh: Add compile_fuse() and compile_unionfs_fuse() diff --git a/gen_initramfs.sh b/gen_initramfs.sh index f8cffb1..bd0ddf1 100644 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -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}" -- 2.26.2