summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2020-11-13 20:06:53 -0500
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2020-11-13 20:06:53 -0500
commitef9a9763625b49a54d1e93bbb8913666914a729e (patch)
tree8bc9b8fc10cc50a58cc104c9f12ea13126d83afd
parent99f00de0588cb7c91f6da97902c5ff687b5c71d4 (diff)
downloadminitramfs-ef9a9763625b49a54d1e93bbb8913666914a729e.tar.xz
minitramfs-ef9a9763625b49a54d1e93bbb8913666914a729e.zip
remove die fn, fix libgcc_s
-rwxr-xr-xmake14
1 files changed, 2 insertions, 12 deletions
diff --git a/make b/make
index 440b851..9d7ae95 100755
--- a/make
+++ b/make
@@ -1,19 +1,9 @@
#!/bin/sh
-toppid=$$
-die() {
- fmt=$1
- shift
- printf "error building initramfs: $fmt\n" "$@" >&2
- kill "$toppid"
- trap '' EXIT
- exit 1
-}
-
# generate a cpio entry for a command
gen_cmd() {
cmd=$1
- cmdp="$(command -v "$cmd")" || die 'command not found: %s' "$cmd"
+ cmdp="$(command -v "$cmd")" || exit 1
# ignore builtins
[ "$cmd" != "$cmdp" ] || return
printf 'file %s %s 0755 0 0\n' "$cmdp" "$cmdp"
@@ -27,7 +17,7 @@ gen_cpio_list() {
gen_cmd e2fsck
gen_cmd dropbear
gen_cmd cryptsetup
- ldconfig -p | awk '$1 == "libgcc_s.so.1" && $2 ~ /x86-64/ { print "file " $4 " " $4 " 0755 0 0" }'
+ ldconfig -p | awk '$1 == "libgcc_s.so.1" && $2 ~ /x86-64/ { print "file /lib64/" $1 " " $4 " 0755 0 0" }'
}
# filter the list and insert parent directory entries