[arch-projects] [mkinitcpio][PATCH 4/4] busybox: create symlinks manually

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Sat Nov 26 07:03:00 EST 2011


On 11/26/2011 08:17 AM, Tom Gundersen wrote:
> This means that no "setup" of the initramfs is requried on boot,
> and this should make testing a lot eaiser by just chrooting into
> the ramfs to check if it works.
>
> Signed-off-by: Tom Gundersen<teg at jklm.no>
> ---
>   init         |    2 --
>   install/base |    5 +++++
>   2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/init b/init
> index 4c07f9d..51b2969 100644
> --- a/init
> +++ b/init
> @@ -1,8 +1,6 @@
>   #!/usr/bin/ash
>   PATH=/usr/bin
>
> -/bin/busybox --install -s
> -
>   . /init_functions
>
>   mount -t proc proc /proc -o nosuid,noexec,nodev
> diff --git a/install/base b/install/base
> index c0c19d2..59c3629 100644
> --- a/install/base
> +++ b/install/base
> @@ -10,6 +10,11 @@ build() {
>       add_symlink /usr/sbin bin
>
>       add_binary /lib/initcpio/busybox /bin/busybox
> +
> +    for applet in `/lib/initcpio/busybox --list`; do
> +        add_symlink "/usr/bin/$applet" busybox
> +    done
> +
>       add_binary /sbin/modprobe
>       add_binary /sbin/blkid
>       add_binary /bin/mount
you can use $() instead of `` ;)

-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



More information about the arch-projects mailing list