[Pkg-dkms-commits] [SCM] Maintainance of the dkms package branch, master, updated. debian/2.0.21.1-1-5-g3731c00
Giuseppe Iuculano
giuseppe at iuculano.it
Fri May 15 20:22:19 UTC 2009
The following commit has been merged in the master branch:
commit 3731c002e7269dfe123712242c49f5516e2b0754
Author: Giuseppe Iuculano <giuseppe at iuculano.it>
Date: Fri May 15 22:21:49 2009 +0200
debian/patches/08-support_kernel-img.conf.patch: Use mkinitramfs only if ramdisk is not set in /etc/kernel-img.conf.
diff --git a/debian/patches/08-support_kernel-img.conf.patch b/debian/patches/08-support_kernel-img.conf.patch
index cc73ca7..893c563 100644
--- a/debian/patches/08-support_kernel-img.conf.patch
+++ b/debian/patches/08-support_kernel-img.conf.patch
@@ -1,49 +1,23 @@
-Use update-initramfs tool instead of mkinitrd/mkinitrd.yaird/mkinitramfs
+Use mkinitramfs only if ramdisk is not set in /etc/kernel-img.conf.
--- a/dkms
+++ b/dkms
-@@ -212,6 +212,20 @@ function remake_initrd()
- mkinitrd='mkinitramfs'
+@@ -215,15 +215,13 @@ function remake_initrd()
+ -e "s/['\"]*//g" \
+ /etc/kernel-img.conf | \
+ awk '{print $1}')
+- else
+- if type update-initramfs >/dev/null 2>&1; then
+- mkinitrd='update-initramfs'
+- fi
+ fi
+
+ # Support initramfs distributions (Ubuntu).
+- if [ -x "/usr/sbin/mkinitramfs" ]; then
+- mkinitrd='mkinitramfs'
++ if [-z "$mkinitrd" ] || [ "$mkinitrd" == "mkinitrd" ]; then
++ if [ -x "/usr/sbin/mkinitramfs" ]; then
++ mkinitrd='mkinitramfs'
++ fi
fi
-+ # Support /etc/kernel-img.conf (Debian)
-+ if [ -f "/etc/kernel-img.conf" ]; then
-+ # we use the first one listed
-+ mkinitrd=$(sed -e '/^\s*ramdisk/!d' \
-+ -e 's/^\s*ramdisk\s*=\s*\(.*\)/\1/' \
-+ -e "s/['\"]*//g" \
-+ /etc/kernel-img.conf | \
-+ awk '{print $1}')
-+ else
-+ if type update-initramfs >/dev/null 2>&1; then
-+ mkinitrd='update-initramfs'
-+ fi
-+ fi
-+
$mkinitrd --version >/dev/null 2>&1
- if [ "$?" -eq 0 ]; then
- echo $""
-@@ -235,11 +249,20 @@ function remake_initrd()
- elif [ -e /etc/debian_version ]; then
- echo $""
- initrd_dir="/boot"
-- echo $"Saving old initrd as $initrd_dir/initrd.img_old-$1"
-- cp -f "$initrd_dir/initrd.img-$1" "$initrd_dir/initrd.img_old-$1"
-+ echo $"Updating initrd"
- echo $"Making new initrd as $initrd_dir/initrd.img-$1"
-- echo $"(If next boot fails, revert to the _old initrd image)"
-- invoke_command "$mkinitrd -o $initrd_dir/initrd.img-$1 $1" "$mkinitrd" background
-+ echo $"(If next boot fails, revert to the .bak initrd image)"
-+ if [ -f "/etc/initramfs-tools/update-initramfs.conf" ] && \
-+ ! ( grep ^update_initramfs /etc/initramfs-tools/update-initramfs.conf | grep -qi no ) && \
-+ [ "$mkinitrd" == "update-initramfs" ]; then
-+ invoke_command "$mkinitrd -u" "$mkinitrd" background
-+ else
-+ echo $"Saving old initrd as $initrd_dir/initrd.img_old-$1"
-+ # we use the same convention as update-initramfs, so that we just
-+ # print the warning once
-+ cp -f "$initrd_dir/initrd.img-$1" "$initrd_dir/initrd.img-$1.bak"
-+ invoke_command "$mkinitrd -o $initrd_dir/initrd.img-$1 $1" "$mkinitrd" background
-+ fi
- exitval="$?"
- else
- echo $""
--
Maintainance of the dkms package
More information about the Pkg-dkms-commits
mailing list