[PATCH] Initramfs patch for ubuntu
Michael_Morgan at Dell.com
Michael_Morgan at Dell.com
Tue Jun 26 16:31:31 CDT 2007
---
dkms | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/dkms b/dkms
index ec209d1..7d1d965 100755
--- a/dkms
+++ b/dkms
@@ -199,7 +199,14 @@ function remake_initrd()
# $2 = arch
local exitval="0"
- mkinitrd --version >/dev/null
+ local mkinitrd='mkinitrd'
+
+ # Support initramfs distributions (Ubuntu).
+ if [ -x "/usr/sbin/mkinitramfs" ]; then
+ mkinitrd='mkinitramfs'
+ fi
+
+ $mkinitrd --version >/dev/null 2>&1
if [ "$?" -eq 0 ]; then
echo $""
initrd_dir="/boot"
@@ -208,7 +215,7 @@ function remake_initrd()
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
+ invoke_command "$mkinitrd -f $initrd_dir/initrd-$1.img $1"
"$mkinitrd" background
exitval="$?"
elif [ -e /etc/SuSE-release ] || [ -d /etc/SuSEconfig ]; then
echo $""
@@ -217,7 +224,7 @@ function remake_initrd()
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
+ invoke_command "$mkinitrd -k vmlinuz-$1 -i initrd-$1"
"$mkinitrd" background
exitval="$?"
elif [ -e /etc/debian_version ]; then
echo $""
@@ -226,12 +233,12 @@ function remake_initrd()
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
+ invoke_command "$mkinitrd -o $initrd_dir/initrd.img-$1 $1"
"$mkinitrd" background
exitval="$?"
else
echo $""
- echo $"Calling mkinitrd (bad exit status 9 may occur)"
- invoke_command "mkinitrd" "mkinitrd" background
+ echo $"Calling $mkinitrd (bad exit status 9 may occur)"
+ invoke_command "$mkinitrd" "$mkinitrd" background
exitval="$?"
fi
--
1.4.4.2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.us.dell.com/pipermail/dkms-devel/attachments/20070626/59a6cdd4/attachment.htm
More information about the DKMS-devel
mailing list