Try to reduce build time and do not build initramfs twice.
authorMichael Prokop <mika@grml.org>
Mon, 6 Jun 2011 20:34:12 +0000 (22:34 +0200)
committerMichael Prokop <mika@grml.org>
Mon, 6 Jun 2011 20:39:25 +0000 (22:39 +0200)
Lets see whether this might break in any situation (thinking of
certain combinations of softupdate, renames,... during release
management) but building the initramfs takes just too long, so let's
try to reduce the build time via building it only from within main
grml-live script and no longer execute update-initramfs in the
/etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs script.

etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs

index bf6b7d9..ea21a6a 100755 (executable)
@@ -12,20 +12,12 @@ fcopy /usr/share/initramfs-tools/scripts/init-top/grml
 fcopy /etc/initramfs-tools/hooks/000-udev-shutup
 fcopy /etc/initramfs-tools/conf.d/xz-compress
 
 fcopy /etc/initramfs-tools/hooks/000-udev-shutup
 fcopy /etc/initramfs-tools/conf.d/xz-compress
 
-FILE=$(ls -1 $target/boot/vmlinuz-* 2>/dev/null| sort -r | head -1)
-KERNELVERSION=$(echo "${FILE##$target/boot/vmlinuz-}")
-
-if [ -z "$KERNELVERSION" ] ; then
-   echo "Error: No kernel found, can not create initramfs. Exiting.">&2
+if ! [ -f $target/usr/share/initramfs-tools/scripts/live ] ; then
+   echo "Error: live-boot/-initramfs does not seem to be present, can not create initramfs. Exiting.">&2
    exit 1
 fi
 
    exit 1
 fi
 
-if [ -f $target/usr/share/initramfs-tools/scripts/live ] ; then
-   $ROOTCMD update-initramfs -c -t -k $KERNELVERSION
-else
-   echo "Error: live-initramfs does not seem to be present, can not create initramfs. Exiting.">&2
-   exit 1
-fi
+# The initramfs itself will be created through grml-live script itself.
 
 ## END OF FILE #################################################################
 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3
 
 ## END OF FILE #################################################################
 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3