diff options
author | Oliver Tappe | 2008-03-11 16:23:19 +0100 |
---|---|---|
committer | Oliver Tappe | 2008-03-11 16:23:19 +0100 |
commit | 75cf6a98b6f768b1d060270f4ed8afc57c924c9f (patch) | |
tree | 02ffe41e9592c1d950b1f985d03a544278f4c960 /initramfs/OpenSLX/MakeInitRamFS/Engine.pm | |
parent | * made hostIs64Bit() available as util function (diff) | |
download | core-75cf6a98b6f768b1d060270f4ed8afc57c924c9f.tar.gz core-75cf6a98b6f768b1d060270f4ed8afc57c924c9f.tar.xz core-75cf6a98b6f768b1d060270f4ed8afc57c924c9f.zip |
Implemented suggestion by Sebastian:
* instead of using a fixed list of applets supported by busybox, we now
determine that list dynamically (by invoking 'busybox --help')
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1616 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/OpenSLX/MakeInitRamFS/Engine.pm')
-rw-r--r-- | initramfs/OpenSLX/MakeInitRamFS/Engine.pm | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/initramfs/OpenSLX/MakeInitRamFS/Engine.pm b/initramfs/OpenSLX/MakeInitRamFS/Engine.pm index 8749eb68..6ce692d6 100644 --- a/initramfs/OpenSLX/MakeInitRamFS/Engine.pm +++ b/initramfs/OpenSLX/MakeInitRamFS/Engine.pm @@ -355,14 +355,21 @@ sub _copyBusybox "$openslxConfig{'base-path'}/share/busybox/busybox", '/bin/busybox' ); - my @busyboxApplets = qw( - ar arping ash bunzip2 cat chmod chown chroot cp cpio cut - date dd df dmesg du echo env expr fdisk free grep gunzip hwclock - insmod id ip kill killall ln ls lsmod mdev mkdir mknod mkswap - modprobe mount mv nice ping printf ps rdate rm rmmod sed sleep - sort swapoff swapon switch_root tar test tftp time touch tr - udhcpc umount uptime usleep vconfig vi vncpasswd wget zcat zcip - ); + my $busyboxForHost + = "$openslxConfig{'base-path'}/share/busybox/busybox" + . ( hostIs64Bit() ? '.x86_64' : '.i586' ); + + my $busyboxHelp = qx{$busyboxForHost --help}; + if ($busyboxHelp !~ m{defined functions:(.+)\z}ims) { + die "unable to parse busybox --help output:\n$busyboxHelp"; + } + my $rawAppletList = $1; + my @busyboxApplets + = map { + $_ =~ s{\s+}{}igms; + $_; + } + split m{,}, $rawAppletList; foreach my $applet (@busyboxApplets) { $self->addCMD("ln -sf /bin/busybox $self->{'build-path'}/bin/$applet"); } |