This commit is contained in:
illiliti 2020-01-30 17:47:23 +03:00
parent 6ffbecfc88
commit 574e206ef0

View File

@ -186,6 +186,7 @@ install_libraries() {
install_files() { install_files() {
# initialize config # initialize config
cat <<EOF > "${tmpdir}/config" cat <<EOF > "${tmpdir}/config"
debug="$debug"
root="$root" root="$root"
root_type="$root_type" root_type="$root_type"
root_args="$root_args" root_args="$root_args"
@ -234,7 +235,7 @@ create_initramfs() {
{ {
( cd "$tmpdir" && { ( cd "$tmpdir" && {
find . | cpio -oH newc | gzip -9 find . | cpio -oH newc | gzip -9
} ) > "/root/initramfs-${kernel}.img.gz" } ) > "./initramfs-${kernel}.img.gz"
} >/dev/null 2>&1 } >/dev/null 2>&1
[ "$?" = 0 ] || panic "failed to generate initramfs image" [ "$?" = 0 ] || panic "failed to generate initramfs image"
@ -245,8 +246,7 @@ create_initramfs() {
[ "$(id -u)" = 0 ] || panic "must be run as root" [ "$(id -u)" = 0 ] || panic "must be run as root"
# remove tmpdir on exit or unexpected error # remove tmpdir on exit or unexpected error
#trap remove_tmpdir EXIT INT trap remove_tmpdir EXIT INT
set -x
# handle debug mode # handle debug mode
[ "$debug" = 1 ] && { [ "$debug" = 1 ] && {