aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2014-04-13 17:55:25 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2014-04-13 17:59:30 -0700
commit6d610cf9afd929e4c973780e1d37746ebf3d15ff (patch)
tree5d577f9c3ae7d04c8b723d41970fe45585661062
parentFix System.map location for src!=output dir. (diff)
downloadgenkernel-6d610cf9afd929e4c973780e1d37746ebf3d15ff.tar.gz
genkernel-6d610cf9afd929e4c973780e1d37746ebf3d15ff.tar.bz2
genkernel-6d610cf9afd929e4c973780e1d37746ebf3d15ff.zip
LVM install fixes.
Clean up LVM install to work with non-root and handle errors. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-xgen_compile.sh7
-rwxr-xr-xgen_initramfs.sh2
2 files changed, 6 insertions, 3 deletions
diff --git a/gen_compile.sh b/gen_compile.sh
index a90977f..9b5df01 100755
--- a/gen_compile.sh
+++ b/gen_compile.sh
@@ -468,8 +468,11 @@ compile_lvm() {
>> ${LOGFILE} 2>&1 || \
gen_die 'Configure of lvm failed!'
print_info 1 'lvm: >> Compiling...'
- compile_generic '' utils
- compile_generic "install DESTDIR=${TEMP}/lvm/" utils
+ compile_generic '' utils || gen_die "failed to build LVM"
+ mkdir -p "${TEMP}/lvm/sbin"
+ compile_generic "install DESTDIR=${TEMP}/lvm/" utils || gen_die "failed to install LVM"
+ # Upstream does u-w on files, and this breaks stuff.
+ chmod -R u+w "${TEMP}/lvm/"
cd "${TEMP}/lvm"
print_info 1 ' >> Copying to bincache...'
diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index 26bcdf6..5ac9ac1 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -349,7 +349,7 @@ append_lvm(){
fi
else
print_info 1 ' LVM: Adding support (compiling binaries)...'
- compile_lvm
+ compile_lvm || gen_die "Could not compile LVM"
/bin/tar -jxpf "${LVM_BINCACHE}" -C "${TEMP}/initramfs-lvm-temp" ||
gen_die "Could not extract lvm binary cache!";
mv ${TEMP}/initramfs-lvm-temp/sbin/lvm.static ${TEMP}/initramfs-lvm-temp/bin/lvm ||