[Pkg-dkms-commits] [SCM] Maintenance of the dkms package branch, master, updated. upstream/2.0.20.4-19-g2a852de

David Paleino d.paleino at gmail.com
Thu Dec 25 20:34:14 UTC 2008


The following commit has been merged in the master branch:
commit 18afe67b90fa6793a4ba8cb5e3b9bc44985d8912
Author: David Paleino <d.paleino at gmail.com>
Date:   Thu Dec 25 21:33:23 2008 +0100

    debian/patches/08-use_update-initramfs.patch: updated to parse /etc/kernel-img.conf

diff --git a/debian/patches/08-use_update-initramfs.patch b/debian/patches/08-use_update-initramfs.patch
index 14c220b..290df84 100644
--- a/debian/patches/08-use_update-initramfs.patch
+++ b/debian/patches/08-use_update-initramfs.patch
@@ -1,35 +1,48 @@
 Use update-initramfs tool instead of mkinitrd/mkinitrd.yaird/mkinitramfs
---- a/dkms
-+++ b/dkms
-@@ -212,6 +212,11 @@
+--- dkms.orig/dkms
++++ dkms/dkms
+@@ -212,6 +212,20 @@
          mkinitrd='mkinitramfs'
      fi
  
-+    # Support update-initramfs (Debian)
-+    if type update-initramfs >/dev/null 2>&1; then
-+	mkinitrd='update-initramfs'
++    # 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,12 +240,13 @@
+@@ -235,11 +249,19 @@
      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 $"Making new initrd as $initrd_dir/initrd.img-$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
--	exitval="$?"
++	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 ); then
-+		echo $"Updating initrd"
-+		echo $"(If next boot fails, revert to the .bak initrd image)"
 +		invoke_command "$mkinitrd -u" "$mkinitrd" background
-+		exitval="$?"
++	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 $""
- 	echo $"Calling $mkinitrd (bad exit status 9 may occur)"

-- 
Maintenance of the dkms package



More information about the Pkg-dkms-commits mailing list