initramfs-tools: fix path to busybox dir.

--HG--
extra : convert_revision : 9d9646c4431000f3ad88276c20d5e33130715b4a
This commit is contained in:
Juan RP 2009-01-30 16:50:56 +01:00
parent 161113838e
commit 8e76afef28

View file

@ -1,36 +1,3 @@
--- mkinitramfs.orig 2008-12-15 01:06:46.000000000 +0100
+++ mkinitramfs 2008-12-15 01:08:08.000000000 +0100
@@ -70,7 +70,7 @@ if [ -n "$supported_host_version" ] || [
fi
if [ -n "$supported_target_version" ]; then
target_upstream_version="${supported_target_version%%-*}"
- if dpkg --compare-versions "$target_upstream_version" lt "2.6.12"; then
+ if ! compare_versions "$target_upstream_version" "2.6.12"; then
exit 2
fi
fi
@@ -164,7 +164,7 @@ fi
DESTDIR="$(mktemp -t -d mkinitramfs_XXXXXX)" || exit 1
__TMPCPIOGZ="$(mktemp -t mkinitramfs-OL_XXXXXX)" || exit 1
-DPKG_ARCH=`dpkg --print-installation-architecture`
+DPKG_ARCH=`uname -m`
# Export environment for hook scripts.
#
@@ -272,8 +272,10 @@ fi
copy_exec /sbin/modprobe /sbin
copy_exec /sbin/depmod /sbin
copy_exec /sbin/rmmod /sbin
-mkdir -p "${DESTDIR}/etc/modprobe.d"
-cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d/"
+if [ -d /etc/modprobe.d ]; then
+ mkdir -p "${DESTDIR}/etc/modprobe.d"
+ cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d/"
+fi
# workaround: libgcc always needed on old-abi arm
if [ "$DPKG_ARCH" = arm ] || [ "$DPKG_ARCH" = armeb ]; then
--- hook-functions.orig 2008-12-15 01:24:05.000000000 +0100
+++ hook-functions 2008-12-15 01:30:55.000000000 +0100
@@ -414,16 +414,28 @@ EOF
@ -83,3 +50,62 @@
echo "W: ${cm_x} hook script requires at least kernel version ${minver}" >&2
echo "W: not generating requested initramfs for kernel ${curversion}" >&2
exit 2
--- mkinitramfs.orig 2009-01-07 15:14:31.000000000 +0100
+++ mkinitramfs 2009-01-30 16:33:00.000000000 +0100
@@ -8,8 +8,7 @@ keep="n"
CONFDIR="/etc/initramfs-tools"
verbose="n"
errors_to="2>/dev/null"
-# BUSYBOXDIR="/usr/lib/initramfs-tools/bin/"
-BUSYBOXDIR="/bin"
+BUSYBOXDIR="/usr/lib/initramfs-tools/bin/"
OPTIONS=`getopt -o d:ko:r:v --long supported-host-version:,supported-target-version: -n "$0" -- "$@"`
@@ -63,21 +62,6 @@ while true; do
esac
done
-# FIXME: remove after Lenny (needed for Etch linux-images)
-if [ -n "$supported_host_version" ] || [ -n "$supported_target_version" ]; then
- if [ -n "$supported_host_version" ]; then
- host_upstream_version="${supported_host_version%%-*}"
- fi
- if [ -n "$supported_target_version" ]; then
- target_upstream_version="${supported_target_version%%-*}"
- if dpkg --compare-versions "$target_upstream_version" lt "2.6.12"; then
- exit 2
- fi
- fi
- echo "Depreciation warning: use ramdisk=mkinitramfs-kpkg."
- exit 0
-fi
-
# For dependency ordered mkinitramfs hook scripts.
. /usr/share/initramfs-tools/scripts/functions
. /usr/share/initramfs-tools/hook-functions
@@ -164,7 +148,7 @@ fi
DESTDIR="$(mktemp -t -d mkinitramfs_XXXXXX)" || exit 1
__TMPCPIOGZ="$(mktemp -t mkinitramfs-OL_XXXXXX)" || exit 1
-DPKG_ARCH=`dpkg --print-installation-architecture`
+DPKG_ARCH=`uname -m`
# Export environment for hook scripts.
#
@@ -272,12 +256,9 @@ fi
copy_exec /sbin/modprobe /sbin
copy_exec /sbin/depmod /sbin
copy_exec /sbin/rmmod /sbin
-mkdir -p "${DESTDIR}/etc/modprobe.d"
-cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d/"
-
-# workaround: libgcc always needed on old-abi arm
-if [ "$DPKG_ARCH" = arm ] || [ "$DPKG_ARCH" = armeb ]; then
- cp -a /lib/libgcc_s.so.1 "${DESTDIR}/lib/"
+if [ -d /etc/modprobe.d ]; then
+ mkdir -p "${DESTDIR}/etc/modprobe.d"
+ cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d/"
fi
run_scripts /usr/share/initramfs-tools/hooks