[Pkg-dkms-maint] Bug#529038: diff

A Mennucc debdev at tonelli.sns.it
Sun May 17 13:16:48 UTC 2009


hi,

this attached patch will use 
the proper dpkg-trigger
to update the initrd

a.
-------------- next part --------------
--- /var/tmp/dkms	2009-05-17 15:03:59.000000000 +0200
+++ /usr/sbin/dkms	2009-05-17 15:11:05.000000000 +0200
@@ -207,69 +207,7 @@
     local exitval="0"
     local mkinitrd='mkinitrd'
 
-    # Support initramfs distributions (Ubuntu).
-    if [ -x "/usr/sbin/mkinitramfs" ]; then
-        mkinitrd='mkinitramfs'
-    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 $""
-	initrd_dir="/boot"
-	[ "$2" == "ia64" ] && [ -d "/boot/efi/efi/redhat" ] && initrd_dir="/boot/efi/efi/redhat"
-	echo $"Saving old initrd as $initrd_dir/initrd-$1_old.img"
-	cp -f "$initrd_dir/initrd-$1.img" "$initrd_dir/initrd-$1_old.img"
-	echo $"Making new initrd as $initrd_dir/initrd-$1.img"
-	echo $"(If next boot fails, revert to the _old initrd image)"
-	invoke_command "$mkinitrd -f $initrd_dir/initrd-$1.img $1" "$mkinitrd" background
-	exitval="$?"
-    elif [ -e /etc/SuSE-release ] || [ -d /etc/SuSEconfig ]; then
-	echo $""
-	initrd_dir="/boot"
-	echo $"Saving old initrd as $initrd_dir/initrd-$1_old"
-	cp -f "$initrd_dir/initrd-$1" "$initrd_dir/initrd-$1_old"
-	echo $"Making new initrd as $initrd_dir/initrd-$1"
-	echo $"(If next boot fails, revert to the _old initrd image)"
-	invoke_command "$mkinitrd -k vmlinuz-$1 -i initrd-$1" "$mkinitrd" background
-	exitval="$?"
-    elif [ -e /etc/debian_version ]; then
-      	echo $""
-	initrd_dir="/boot"
-	echo $"Updating initrd"
-	echo $"Making new initrd as $initrd_dir/initrd.img-$1"
-	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 $""
-	echo $"Calling $mkinitrd (bad exit status 9 may occur)"
-	invoke_command "$mkinitrd" "$mkinitrd" background
-	exitval="$?"
-    fi
+    dpkg-trigger update-initramfs
 
     # Rerun lilo if necessary
     if ( grep ^do_bootloader /etc/kernel-img.conf |  grep -qi yes  ) && [ -e /etc/lilo.conf ]; then


More information about the Pkg-dkms-maint mailing list