X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FGRMLBASE%2F10-build-initramfs;h=ea21a6a7cac64c7155c1c8b5fb0cdde2937b1226;hp=9c33559fcd5c3f50a934d17fa20422e75b8e7a35;hb=d95eed100eaf3c6b134cc24c93340d258ba81695;hpb=ff64300505ae5b174328cbc97ecc6b0c055a4efd diff --git a/etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs b/etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs index 9c33559..ea21a6a 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs +++ b/etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs @@ -1,28 +1,23 @@ -#!/bin/sh +#!/bin/bash # Filename: /etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs # Purpose: configure live-initramfs and build initramfs for booting # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. -# Latest change: Sat Oct 06 16:47:50 CEST 2007 [mika] ################################################################################ -set -u set -e -cp /etc/grml/fai/live-initramfs/live.conf $target/etc/live.conf -cp /etc/grml/fai/live-initramfs/grml-script.init-top "$target/usr/share/initramfs-tools/scripts/init-top/grml" +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 -FILE=$(ls -1 $target/boot/vmlinuz-* | sort -r | head -1) -KERNELVERSION=$(echo "${FILE##$target/boot/vmlinuz-}") - -# make sure mdadm isn't executed in initrd: -if [ -f "$target"/etc/default/mdadm ] ; then - sed -i "s/START_DAEMON=.*/START_DAEMON=false/" "$target"/etc/default/mdadm - sed -i "s/INITRDSTART=.*/INITRDSTART=none/" "$target"/etc/default/mdadm +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 -$ROOTCMD update-initramfs -c -t -k $KERNELVERSION +# 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