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

Giuseppe Iuculano giuseppe at iuculano.it
Thu Dec 25 09:16:21 UTC 2008


The following commit has been merged in the master branch:
commit 63255754945d9125ac5b87c2c5ab648bb3f0c467
Author: Giuseppe Iuculano <giuseppe at iuculano.it>
Date:   Thu Dec 25 10:14:08 2008 +0100

    debian/patches/08-use_update-initramfs.patch: Use update-initramfs tool instead of mkinitrd/mkinitrd.yaird/mkinitramfs
    
    I think using update-initramfs is the best way to update initramfs, this
    require further discussion.

diff --git a/debian/patches/08-use_update-initramfs.patch b/debian/patches/08-use_update-initramfs.patch
new file mode 100644
index 0000000..14c220b
--- /dev/null
+++ b/debian/patches/08-use_update-initramfs.patch
@@ -0,0 +1,35 @@
+Use update-initramfs tool instead of mkinitrd/mkinitrd.yaird/mkinitramfs
+--- a/dkms
++++ b/dkms
+@@ -212,6 +212,11 @@
+         mkinitrd='mkinitramfs'
+     fi
+ 
++    # Support update-initramfs (Debian)
++    if type update-initramfs >/dev/null 2>&1; then
++	mkinitrd='update-initramfs'
++    fi
++
+     $mkinitrd --version >/dev/null 2>&1
+     if [ "$?" -eq 0 ]; then
+       	echo $""
+@@ -235,12 +240,13 @@
+     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 $"(If next boot fails, revert to the _old initrd image)"
+-	invoke_command "$mkinitrd -o $initrd_dir/initrd.img-$1 $1" "$mkinitrd" background
+-	exitval="$?"
++	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="$?"
++	fi
+     else
+ 	echo $""
+ 	echo $"Calling $mkinitrd (bad exit status 9 may occur)"
diff --git a/debian/patches/series b/debian/patches/series
index df33b96..3bc0b99 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
 05-do_not_check_admin_group.patch
 06-fakeroot.patch
 07-exit-if-build-fails.patch
+08-use_update-initramfs.patch

-- 
Maintenance of the dkms package



More information about the Pkg-dkms-commits mailing list