summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog72
-rw-r--r--debian/control2
-rw-r--r--hook-functions10
-rwxr-xr-xhooks/thermal17
-rwxr-xr-xinit6
-rwxr-xr-xmkinitramfs4
-rw-r--r--scripts/functions18
-rwxr-xr-xscripts/init-premount/thermal16
-rw-r--r--update-initramfs12
9 files changed, 137 insertions, 20 deletions
diff --git a/debian/changelog b/debian/changelog
index 1308f23..b82a343 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,7 +4,12 @@ initramfs-tools (0.51) unstable; urgency=low
* mkinitramfs: Use ${CONFDIR} everywhere.
- -- maximilian attems <maks@sternwelten.at> Mon, 23 Jan 2006 21:46:45 +0100
+ * Sync with 0.40ubuntu16:
+ - skip 0.40ubuntu15 udev gets fixed to only call update-initramfs
+ when /etc/mkinitramfs/initramfs.conf is there.
+ - 0.40ubuntu13 don't take over all initramfs images in Debian.
+
+ -- maximilian attems <maks@sternwelten.at> Tue, 24 Jan 2006 11:12:18 +0100
initramfs-tools (0.50c) unstable; urgency=low
@@ -109,6 +114,71 @@ initramfs-tools (0.42) unstable; urgency=low
-- maximilian attems <maks@sternwelten.at> Mon, 5 Dec 2005 12:59:59 +0100
+initramfs-tools (0.40ubuntu16) dapper; urgency=low
+
+ * Bump klibc-utils dependency to (>= 1.1.16-1), for hppa and ia64.
+
+ -- Adam Conrad <adconrad@ubuntu.com> Thu, 19 Jan 2006 04:00:39 +1100
+
+initramfs-tools (0.40ubuntu15) dapper; urgency=low
+
+ * Drop the udev dependency, so we always get configured before udev.
+ We can get away with this now that udev hooks/scripts have been split
+ into the udev package proper. This should close Malone bug #28808.
+
+ -- Adam Conrad <adconrad@ubuntu.com> Wed, 18 Jan 2006 22:50:27 +1100
+
+initramfs-tools (0.40ubuntu14) dapper; urgency=low
+
+ * If copy_exec is asked to copy to the same location twice, check if
+ we're copying the same file again. If so, do nothing and carry on, if
+ not, warn that we asked it for an impossibility, and don't overwrite.
+
+ -- Adam Conrad <adconrad@ubuntu.com> Thu, 12 Jan 2006 18:00:12 +1100
+
+initramfs-tools (0.40ubuntu13) dapper; urgency=low
+
+ * Default to taking over other initramfs images in Ubuntu, as this is
+ more consistent with what our packaging expects to be able to do.
+ * Make "update-initramfs -u" try to find the running kernel before it
+ attempts to search the symbolic link list and its own sha1 list.
+
+ -- Adam Conrad <adconrad@ubuntu.com> Wed, 11 Jan 2006 16:25:20 +1100
+
+initramfs-tools (0.40ubuntu12) dapper; urgency=low
+
+ * Oops, move the progress state file into the new directory too.
+
+ -- Adam Conrad <adconrad@ubuntu.com> Mon, 9 Jan 2006 21:26:44 +1100
+
+initramfs-tools (0.40ubuntu11) dapper; urgency=low
+
+ * Move the state directory from /dev/initramfs to /dev/.initramfs
+
+ -- Adam Conrad <adconrad@ubuntu.com> Mon, 9 Jan 2006 21:17:50 +1100
+
+initramfs-tools (0.40ubuntu10) dapper; urgency=low
+
+ * Create the /dev/initramfs directory as soon as we mount /dev, so other
+ packages that need a playground in /dev can do so in a uniform location.
+ * Update the usplash progress bar every time we are asked to output a
+ success or failure value from an init action, and write our progress to
+ /dev/initramfs for sysv-init to gather up and pick up where we left off.
+ * Export $DPKG_ARCH in both mkinitramfs (for use by hooks) and initramfs.
+ * Use $DPKG_ARCH in the thermal hook/script to divide the x86 stuff from
+ the powerpc stuff, not because we have to, but as an example to others.
+
+ -- Adam Conrad <adconrad@ubuntu.com> Mon, 9 Jan 2006 10:51:51 +1100
+
+initramfs-tools (0.40ubuntu9) dapper; urgency=low
+
+ * Make some changes to cope with the new and improved klibc packaging:
+ - Add a force to the deletion of ${DESTDIR}/bin/sh, to avoid errors.
+ - Cope with libklibc moving from /usr/lib/klibc/lib to /lib.
+ - Bump dependency on klibc-utils to one new enough for the above.
+
+ -- Adam Conrad <adconrad@ubuntu.com> Thu, 5 Jan 2006 15:13:15 +1100
+
initramfs-tools (0.40ubuntu8) dapper; urgency=low
* Call modprobe everywhere with "-Qb" to silence messages and allow user
diff --git a/debian/control b/debian/control
index 4e06b8e..b4124ab 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Standards-Version: 3.6.2.0
Package: initramfs-tools
Architecture: all
-Depends: klibc-utils (>= 1.1.14-2), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, udev (>= 0.076-5)
+Depends: klibc-utils (>= 1.1.16-1), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, udev (>= 0.076-5)
Provides: linux-initramfs-tool
Description: tools for generating an initramfs
This package contains tools to create and boot an initramfs for prepackaged
diff --git a/hook-functions b/hook-functions
index d3fe0a3..000c701 100644
--- a/hook-functions
+++ b/hook-functions
@@ -54,7 +54,15 @@ manual_add_modules()
# $1 is source
# $2 is relative destination
copy_exec() {
- ln -s ${1} ${DESTDIR}/${2}
+ final_destination=${DESTDIR}/${2}/`basename ${1}`
+ if [ -L "$final_destination" ]; then
+ if ! [ `readlink ${final_destination}` = "${1}" ]; then
+ echo "W:copy_exec: Not copying ${1} to \$DESTDIR${2}/`basename ${1}`, which is already a copy of `readlink ${final_destination}`" >&2
+ return
+ fi
+ else
+ ln -s ${1} ${DESTDIR}/${2}
+ fi
# Copy the dependant libraries
for x in $(ldd ${1} 2>/dev/null | sed -e '
diff --git a/hooks/thermal b/hooks/thermal
index 4426de3..c27c957 100755
--- a/hooks/thermal
+++ b/hooks/thermal
@@ -19,10 +19,13 @@ esac
. /usr/share/initramfs-tools/hook-functions
-# ACPI Systems
-for x in fan thermal; do
- manual_add_modules ${x}
-done
-
-# PPC64 Systems
-manual_add_modules therm_pm72
+case "$DPKG_ARCH" in
+# copy the right modules
+powerpc|ppc64)
+ manual_add_modules therm_pm72
+ ;;
+i386|amd64|ia64)
+ manual_add_modules fan
+ manual_add_modules thermal
+ ;;
+esac
diff --git a/init b/init
index db18f15..e983534 100755
--- a/init
+++ b/init
@@ -13,9 +13,15 @@ mount -t proc none /proc
# are used; which they will be, but it's worth pointing out
mount -t tmpfs -o mode=0755 udev /dev
touch /dev/.initramfs-tools
+mkdir /dev/.initramfs
mknod /dev/console c 5 1
mknod /dev/null c 1 3
+# Export the dpkg architecture
+export DPKG_ARCH=
+. /conf/arch.conf
+
+# Bring in the main config
. /conf/initramfs.conf
. /scripts/functions
diff --git a/mkinitramfs b/mkinitramfs
index 9b9e734..d3d6504 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -126,12 +126,15 @@ fi
DESTDIR="$(mktemp -t -d mkinitramfs_XXXXXX)" || exit 1
__TMPCPIOGZ="$(mktemp -t mkinitramfs-OL_XXXXXX)" || exit 1
+DPKG_ARCH=`dpkg --print-installation-architecture`
+
# Export environment for hook scripts.
#
export MODULESDIR
export version
export CONFDIR
export DESTDIR
+export DPKG_ARCH
# Private, used by 'catenate_cpiogz'.
export __TMPCPIOGZ
@@ -168,6 +171,7 @@ for f in $(cd ${CONFDIR}/scripts && \
mkdir --parents "${DESTDIR}/scripts/$(dirname "${f}")"
cp -p "${CONFDIR}/scripts/${f}" "${DESTDIR}/scripts/$(dirname "${f}")"
done
+echo "DPKG_ARCH=${DPKG_ARCH}" > ${DESTDIR}/conf/arch.conf
copy_exec "${CONFDIR}/initramfs.conf" /conf
# Busybox
diff --git a/scripts/functions b/scripts/functions
index f9cad01..7f8fa3c 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -35,12 +35,22 @@ log_end_msg()
/sbin/usplash_write "SUCCESS ok"
fi
_log_msg "Done."
+ update_progress
}
-# update_progress() # ToDo: NOP placeholder... what else for usplash?
-# {
-# :
-# }
+update_progress()
+{
+ if [ -z "$PROGRESS_STATE" ]; then
+ export PROGRESS_STATE=0
+ fi
+
+ PROGRESS_STATE=$(($PROGRESS_STATE + 1))
+ echo "PROGRESS_STATE=${PROGRESS_STATE}" > /dev/.initramfs/progress_state
+
+ if [ -x /sbin/usplash_write ]; then
+ /sbin/usplash_write "PROGRESS $PROGRESS_STATE"
+ fi
+}
panic()
{
diff --git a/scripts/init-premount/thermal b/scripts/init-premount/thermal
index e0d79c3..a41f6f3 100755
--- a/scripts/init-premount/thermal
+++ b/scripts/init-premount/thermal
@@ -15,9 +15,13 @@ prereqs)
;;
esac
-# For ACPI systems
-modprobe -q fan
-modprobe -q thermal
-
-# For ppc64 systems
-modprobe -q therm_pm72
+case "$DPKG_ARCH" in
+# load the right modules
+powerpc|ppc64)
+ modprobe -q therm_pm72
+ ;;
+i386|amd64|ia64)
+ modprobe -q fan
+ modprobe -q thermal
+ ;;
+esac
diff --git a/update-initramfs b/update-initramfs
index 644a1aa..0d757b1 100644
--- a/update-initramfs
+++ b/update-initramfs
@@ -112,6 +112,13 @@ get_sorted_versions()
verbose "Available versions: ${version_list}"
}
+set_current_version()
+{
+ if [ -f /boot/vmlinu?-`uname -r` ]; then
+ version=`uname -r`
+ fi
+}
+
set_linked_version()
{
if [ -L /initrd.img ]; then
@@ -160,6 +167,10 @@ create()
update()
{
if [ -z "${version}" ]; then
+ set_current_version
+ fi
+
+ if [ -z "${version}" ]; then
set_linked_version
fi
@@ -227,6 +238,7 @@ altered_check()
# Defaults
verbose=0
yes=0
+# We default to takeover=1 in Ubuntu, but not Debian
takeover=0
##