From 7d7aa60e191a1bfa50ef45814c7e6f398c865edd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 19 May 2015 11:38:06 +0200 Subject: [PATCH] create directories required by busybox Signed-off-by: Nico Schottelius --- hacking/{ => v2-initramfs-from-os}/all.sh | 0 hacking/v3-busybox/{generate.sh => create_initramfs.sh} | 7 +++++-- hacking/{ => v3-busybox}/create_iso.sh | 0 hacking/{ => v3-busybox}/qemu-test.sh | 0 4 files changed, 5 insertions(+), 2 deletions(-) rename hacking/{ => v2-initramfs-from-os}/all.sh (100%) rename hacking/v3-busybox/{generate.sh => create_initramfs.sh} (72%) rename hacking/{ => v3-busybox}/create_iso.sh (100%) rename hacking/{ => v3-busybox}/qemu-test.sh (100%) diff --git a/hacking/all.sh b/hacking/v2-initramfs-from-os/all.sh similarity index 100% rename from hacking/all.sh rename to hacking/v2-initramfs-from-os/all.sh diff --git a/hacking/v3-busybox/generate.sh b/hacking/v3-busybox/create_initramfs.sh similarity index 72% rename from hacking/v3-busybox/generate.sh rename to hacking/v3-busybox/create_initramfs.sh index 00227a57..6d57b05c 100755 --- a/hacking/v3-busybox/generate.sh +++ b/hacking/v3-busybox/create_initramfs.sh @@ -5,14 +5,17 @@ set -ex initramfs_dir=$(mktemp -d /tmp/cdist-preos.XXXXXXX) # initramfs_dir=$1 -for dir in bin sbin etc proc sys newroot; do +for dir in bin sbin etc proc sys newroot usr/bin usr/sbin; do mkdir -p ${initramfs_dir}/$dir done touch ${initramfs_dir}/etc/mdev.conf cp init "${initramfs_dir}/init" cp $(which busybox) "${initramfs_dir}/bin" -ln -fs busybox "${initramfs_dir}/bin/sh" + +for link in sh mount; do + ln -fs busybox "${initramfs_dir}/bin/$link" +done cd "${initramfs_dir}" find . | cpio -H newc -o | gzip diff --git a/hacking/create_iso.sh b/hacking/v3-busybox/create_iso.sh similarity index 100% rename from hacking/create_iso.sh rename to hacking/v3-busybox/create_iso.sh diff --git a/hacking/qemu-test.sh b/hacking/v3-busybox/qemu-test.sh similarity index 100% rename from hacking/qemu-test.sh rename to hacking/v3-busybox/qemu-test.sh