From 90a394350dc92c18628441c73760a9717ed5d8ba Mon Sep 17 00:00:00 2001 From: Georgi Georgiev Date: Fri, 25 Jan 2013 01:54:41 +0900 Subject: [PATCH] LVM has read-only files that would prompt for deletion This only happens when testing as a non-root user, but even so, it doesn't hurt to make this less annoying. --- gen_initramfs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gen_initramfs.sh b/gen_initramfs.sh index bd22bfd..ed49e01 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -273,7 +273,7 @@ append_iscsi(){ append_lvm(){ if [ -d "${TEMP}/initramfs-lvm-temp" ] then - rm -r "${TEMP}/initramfs-lvm-temp/" + rm -rf "${TEMP}/initramfs-lvm-temp/" fi cd ${TEMP} mkdir -p "${TEMP}/initramfs-lvm-temp"/{bin,sbin} @@ -305,7 +305,7 @@ append_lvm(){ find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ || gen_die "compressing lvm cpio" cd "${TEMP}" - rm -r "${TEMP}/initramfs-lvm-temp/" + rm -rf "${TEMP}/initramfs-lvm-temp/" } append_mdadm(){