X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FGRMLBASE%2F10-build-initramfs;h=9777a52a2ef0fad8791fe3808d9ea236d2641313;hb=cfb3ddf55a9f047d57dc3d3e0bbd12f941aaa6e1;hp=923b754fa16aa6bb9749af16374b60db8a58eb2e;hpb=bc3fb695369f16a11cbbb6ab57bd7d6898fe6f52;p=grml-live.git diff --git a/etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs b/etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs index 923b754..9777a52 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs +++ b/etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs @@ -4,13 +4,21 @@ # 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: Thu Oct 18 14:02:50 CEST 2007 [mika] ################################################################################ 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" +if ! [ -f "$target/etc/live.conf" ] ; then + echo "Warning: $target/etc/live.conf does not exist yet," + echo " ... installing /etc/grml/fai/live-initramfs/live.conf" + cp /etc/grml/fai/live-initramfs/live.conf "$target/etc/live.conf" +fi + +if [ -f /etc/grml/fai/live-initramfs/grml-script.init-top ] ; then + cp /etc/grml/fai/live-initramfs/grml-script.init-top "$target/usr/share/initramfs-tools/scripts/init-top/grml" +else + echo "Warning: /etc/grml/fai/live-initramfs/grml-script.init-top could not be read" +fi FILE=$(ls -1 $target/boot/vmlinuz-* 2>/dev/null| sort -r | head -1) KERNELVERSION=$(echo "${FILE##$target/boot/vmlinuz-}") @@ -24,8 +32,13 @@ KERNELVERSION=$(echo "${FILE##$target/boot/vmlinuz-}") if [ -z "$KERNELVERSION" ] ; then echo "Error: No kernel found, can not create initramfs. Exiting.">&2 exit 1 -else +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 ## END OF FILE #################################################################