blob: 5b1971b4da7e95aa5fa1ebf7b647ef8c7819bb50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#!/bin/sh
[ "$1" = prereqs ] && { echo; exit; }
CopyExec() { copy_exec "$@" || exit 1; }
. /usr/share/initramfs-tools/hook-functions
for f in ./old-school/* loop-layer.sh; do CopyExec "$f" /bin; done
# TODO: check samizdat source to see what it copies
path_execs='mountpoint openvt rsync gpg2 gpg-agent pinentry-curses truncate cryptsetup mkfs.btrfs btrfs fsck.hfsplus'
for c in $path_execs; do CopyExec "$(which $c)" /bin; done
graft_paths="
/bin/OpenVT=/bin/openvt
/bin/LoSetup=/sbin/losetup
/patchroot/patchroot.sh=patchroot.sh
/patchroot/sources.list=/etc/apt/sources.list
/patchroot/initrd-dependencies.txt=initrd-dependencies.txt
"
for e in $graft_paths; do
case "$e" in
*=*)
dest=${e%%=*}
src=${e#*=}
CopyExec "$src" "$dest"
;;
*) exit 1 ;;
esac
done
absolute_path_copies='/lib/terminfo/l/linux'
for f in $absolute_path_copies; do CopyExec "$f" "$f"; done
samizdat_execs_dir=/home/d/src/samizdat # TODO
samizdat_execs='wait_for_files samizdat-pinentry dynmenu src/samizdat-password-agent src/samizdat-gpg-agent'
for c in $samizdat_execs; do CopyExec ${samizdat_execs_dir}/$c /bin; done
CopyExec vol_id.txt /lib/samizdat/vol_id.txt
modules='loop xts dm-crypt hfs hfsplus'
for m in $modules; do force_load "$m" || exit 1; done
sex() { (set -x; "$@"); }
modules_dirs='kernel/drivers/net/ethernet kernel/fs/nls'
for dir in $modules_dirs; do
copy_modules_dir "$dir" || exit 1
done
exit 0
|