improve initramfs generation code
authorMichael Prokop <mika@grml.org>
Fri, 3 Nov 2006 22:55:42 +0000 (23:55 +0100)
committerMichael Prokop <mika@grml.org>
Fri, 3 Nov 2006 22:55:42 +0000 (23:55 +0100)
chroot-script

index ea845d1..e6c95a7 100644 (file)
@@ -134,13 +134,13 @@ KERNELVER=${KERNELIMG#/boot/vmlinuz-}
 if [ -n "$INITRD" ] ; then
    if [ "$RELEASE" = 'sarge' ] ; then
       echo "Release sarge detected, will not create an initrd."
-      return 0
-   fi
-   echo "Generating initrd."
-   update-initramfs -c -t -k $KERNELVER
-   if [ -f "/boot/initrd.img-$KERNELVER" ] ; then
-      GRUBINITRD="initrd          /boot/initrd.img-$KERNELVER"
-      LILOINITRD="        initrd=/boot/initrd.img-$KERNELVER"
+   else
+      echo "Generating initrd."
+      update-initramfs -c -t -k $KERNELVER
+      if [ -f "/boot/initrd.img-$KERNELVER" ] ; then
+         GRUBINITRD="initrd          /boot/initrd.img-$KERNELVER"
+         LILOINITRD="        initrd=/boot/initrd.img-$KERNELVER"
+      fi
    fi
 fi