summaryrefslogtreecommitdiff
path: root/initramfs-tools
diff options
context:
space:
mode:
authorGordon GECOS <u@adam>2023-11-22 16:07:32 -0500
committerGordon GECOS <u@adam>2023-11-22 16:14:17 -0500
commite015b8cbe957a1913f178dc5e4ba166972f79320 (patch)
treeb11b5af7586d05d2bd064ea3b4c14612897b6e02 /initramfs-tools
parent81fdd7a90cc0dfdc2bc2744d41a346c0d255a6af (diff)
build system cleanup
Diffstat (limited to 'initramfs-tools')
-rwxr-xr-xinitramfs-tools/hooks/samizdat21
1 files changed, 10 insertions, 11 deletions
diff --git a/initramfs-tools/hooks/samizdat b/initramfs-tools/hooks/samizdat
index 1d4c1fe..fb424e6 100755
--- a/initramfs-tools/hooks/samizdat
+++ b/initramfs-tools/hooks/samizdat
@@ -1,21 +1,20 @@
1#!/bin/sh 1#!/bin/sh
2[ "$1" = prereqs ] && { echo; exit; } 2[ "$1" = prereqs ] && { echo; exit; }
3
4. /usr/share/initramfs-tools/hook-functions 3. /usr/share/initramfs-tools/hook-functions
5 4
5OUR_BINPATH=/usr/local/lib/samizdat/initrd/bin
6
7# This insanity is necessary for initramfs-tools.
8# TODO: File bug against initramfs-tools.
9PATH=$OUR_BINPATH:$PATH
10
6die() { printf 'Error: generating initramfs: %s\n' "$*" >&2; exit 1; } 11die() { printf 'Error: generating initramfs: %s\n' "$*" >&2; exit 1; }
7 12
8CopyExec() { copy_exec "$@" || die "failed to copy_exec $*"; } 13CopyExec() { copy_exec "$@" || die "failed to copy_exec $*"; }
9CopyExecE() { [ "$2" ] || die "cannot find binary to copy: $1"; shift; CopyExec "$@"; } 14CopyExecE() { [ "$2" ] || die "cannot find binary to copy: $1"; shift; CopyExec "$@"; }
10 15
11SAMIZDAT_INITRD_PATH=/usr/local/lib/samizdat-rhizome/initrd
12
13PATH=${SAMIZDAT_INITRD_PATH}:/usr/local/bin:$PATH
14
15repo_execs=$(echo "${SAMIZDAT_INITRD_PATH}"/*)
16
17path_execs=' 16path_execs='
18 mountpoint openvt rsync gpg2 pinentry-curses truncate dmsetup 17 mountpoint openvt rsync truncate dmsetup
19 dmstats cryptsetup mkfs.btrfs btrfs fsck.hfsplus wait_for_files 18 dmstats cryptsetup mkfs.btrfs btrfs fsck.hfsplus wait_for_files
20 dynmenu parted fallocate strace btrfstune sfdisk 19 dynmenu parted fallocate strace btrfstune sfdisk
21' 20'
@@ -23,15 +22,15 @@ path_execs='
23graft_paths=" 22graft_paths="
24 /bin/OpenVT=/bin/openvt 23 /bin/OpenVT=/bin/openvt
25 /bin/LoSetup=/sbin/losetup 24 /bin/LoSetup=/sbin/losetup
26 /patchroot/patchroot.sh=${SAMIZDAT_INITRD_PATH}/patchroot.sh 25 /patchroot/patchroot.sh=${OUR_BINPATH}/patchroot.sh
27" 26"
28 27
29absolute_path_copies='/lib/terminfo/l/linux /usr/bin/gpg-agent' 28absolute_path_copies='/lib/terminfo/l/linux'
30 29
31modules='loop dm-snapshot dm-crypt btrfs hfs hfsplus' 30modules='loop dm-snapshot dm-crypt btrfs hfs hfsplus'
32modules_dirs='kernel/drivers/net/ethernet kernel/fs/nls kernel/crypto' 31modules_dirs='kernel/drivers/net/ethernet kernel/fs/nls kernel/crypto'
33 32
34for f in $repo_execs; do CopyExec "$f" /bin; done 33for f in "${OUR_BINPATH}"/*; do CopyExec "$f" /bin; done
35for c in $path_execs; do 34for c in $path_execs; do
36 s=$(which $c) 35 s=$(which $c)
37 CopyExecE "$c" "$s" /bin; 36 CopyExecE "$c" "$s" /bin;