forked from ungleich-public/cdist
can generate initramfs from busybox
Signed-off-by: Nico Schottelius <nico@wurzel.schottelius.org>
This commit is contained in:
parent
f51a444012
commit
7ba6c0a44a
10 changed files with 119 additions and 29 deletions
3
hacking/v2-initramfs-from-os/file_list_of_packages.sh
Normal file
3
hacking/v2-initramfs-from-os/file_list_of_packages.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
pacman -Qlq "$@"
|
||||
19
hacking/v2-initramfs-from-os/filelist_from_package.sh
Executable file
19
hacking/v2-initramfs-from-os/filelist_from_package.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Generate filelist excluding stuff that takes only space
|
||||
(
|
||||
for pkg in systemd openssh \
|
||||
bash bzip2 coreutils cryptsetup device-mapper dhcpcd \
|
||||
diffutils e2fsprogs file filesystem findutils gawk \
|
||||
gettext glibc grep gzip inetutils iproute2 \
|
||||
iputils jfsutils less licenses linux logrotate lvm2 \
|
||||
man-db man-pages mdadm nano pacman pciutils \
|
||||
pcmciautils perl procps-ng psmisc reiserfsprogs \
|
||||
s-nail sed shadow sysfsutils systemd-sysvcompat tar \
|
||||
texinfo usbutils util-linux vi which xfsprogs \
|
||||
; do
|
||||
pacman -Qlq $pkg | grep -v \
|
||||
-e /usr/share/man/ \
|
||||
-e /usr/share/doc/
|
||||
done
|
||||
) | sort | uniq
|
||||
18
hacking/v2-initramfs-from-os/filelist_to_dir.sh
Executable file
18
hacking/v2-initramfs-from-os/filelist_to_dir.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "$0 outdir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
outdir=$1; shift
|
||||
|
||||
mkdir -p "$outdir"
|
||||
|
||||
while read file; do
|
||||
if [ -d "$file" ]; then
|
||||
mkdir -p "$outdir$file"
|
||||
else
|
||||
cp --preserve=mode,links "$file" "$outdir$file"
|
||||
fi
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue