diff options
| -rw-r--r-- | debian/changelog | 23 | ||||
| -rw-r--r-- | debian/initramfs-tools.postrm | 1 | ||||
| -rw-r--r-- | scripts/functions | 39 | ||||
| -rwxr-xr-x | update-initramfs | 19 |
4 files changed, 75 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog index 2e939e9..82983ae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,7 +17,28 @@ initramfs-tools (0.65) unstable; urgency=low * update-initramfs: Show by default which initramfs gets generated. (closes: #364301) - -- maximilian attems <maks@sternwelten.at> Sat, 24 Jun 2006 10:46:40 +0200 + * Resync with 0.40ubuntu32: + - Make prereqs conditional on the script/hook actually existing. From + now on, this means that 'PREREQ="udev"' means "run udev first, iff it + happens to be installed". Having the files exist on the filesystem if + you have a HARD dependency should be enforced with package dependencies. + (closes: #369617) + - Make "update-initramfs -u" try to find the running kernel *after* it + attempts to search the symbolic link list and its own sha1 list. + Using this as a fallback, rather than the default, should solve most + upgrade issues, where people found their initramfs was half-baked. + - Abstract out the kernel minversion checking stuff into the function + library, so we can reuse it to check minversion requirements for hook + scripts as well (such as udev, which requires >= 2.6.15 in dapper) + - Bump the kernel minversion to 2.6.15 on hppa and ia64, since they used + initrd-tools with their 2.6.12 kernels in breezy, not initramfs-tools. + - If mkinitramfs fails due to minversion not being met, don't bail out + of update-initramfs, but just exit 0, so upgrades don't halt on it. + + * debian/initramfs-tools.postrm: We no longer need to explicitly remove + /etc/initramfs-tools/modules. + + -- maximilian attems <maks@sternwelten.at> Sat, 24 Jun 2006 11:42:07 +0200 initramfs-tools (0.64) unstable; urgency=low diff --git a/debian/initramfs-tools.postrm b/debian/initramfs-tools.postrm index b711f2c..b2f40bd 100644 --- a/debian/initramfs-tools.postrm +++ b/debian/initramfs-tools.postrm @@ -1,7 +1,6 @@ #!/bin/sh if [ "x${1}" = "xpurge" ]; then - rm -f /etc/initramfs-tools/modules rm -f /etc/initramfs-tools/conf.d/resume fi diff --git a/scripts/functions b/scripts/functions index 96a5577..35485c6 100644 --- a/scripts/functions +++ b/scripts/functions @@ -91,6 +91,14 @@ set_initlist() reduce_satisfied() { deplist="$(render array_${1})" + unset tmpdeplist + for rs_y in ${deplist}; do + if [ ! -f ${initdir}/${rs_y} ]; then + continue + fi + tmpdeplist="${tmpdeplist} ${rs_y}" + done + deplist=${tmpdeplist} for rs_x in ${runlist}; do pop_list_item ${rs_x} ${deplist} deplist=${tmppop} @@ -176,6 +184,37 @@ run_scripts() call_scripts } +check_minkver() +{ + curversion=${1} + initdir=${2} + set_initlist + if [ -z ${initdir} ]; then + DPKG_ARCH=`dpkg --print-installation-architecture` + case ${DPKG_ARCH} in + ia64|hppa) + minversion="2.6.15" + ;; + *) + minversion="2.6.12" + ;; + esac + if dpkg --compare-versions "${curversion}" lt "${minversion}"; then + echo "W: kernerl ${curversion} too old for initramfs on ${DPKG_ARCH}" >&2 + echo "W: not generating requested initramfs for kernel ${curversion}" >&2 + exit 2 + fi + fi + [ -z ${initdir} ] || for cm_x in ${initlist}; do + tmp=$(eval echo $(grep ^MINKVER ${initdir}/${cm_x} | cut -d'=' -f2)) + if dpkg --compare-versions "${curversion}" lt "${tmp}"; then + echo "W: ${cm_x} hook script requires at least kernel version ${tmp}" >&2 + echo "W: not generating requested initramfs for kernel ${curversion}" >&2 + exit 2 + fi + done +} + # Load custom modules first load_modules() { diff --git a/update-initramfs b/update-initramfs index 03bf5cf..2f3ebcf 100755 --- a/update-initramfs +++ b/update-initramfs @@ -67,8 +67,17 @@ generate_initramfs() if [ "${verbose}" = 1 ]; then OPTS="-v $OPTS" fi - mkinitramfs $OPTS "${initramfs}" "${version}" - set_sha1 + if mkinitramfs $OPTS "${initramfs}" "${version}"; then + set_sha1 + else + mkinitramfs_return="$?" + if [ "$mkinitramfs_return" = "2" ]; then + # minversion wasn't met, exit 0 + exit 0 + fi + verbose "mkinitramfs failed for ${initramfs}" + exit $mkinitramfs_return + fi } # only run lilo if no grub is around @@ -192,15 +201,15 @@ create() update() { if [ -z "${version}" ]; then - set_current_version + set_linked_version fi if [ -z "${version}" ]; then - set_linked_version + set_highest_version fi if [ -z "${version}" ]; then - set_highest_version + set_current_version fi if [ "${version}" = "all" ]; then |
