diff --git a/base/mkinitramfs/files/30-blocks.sh b/base/mkinitramfs/files/30-blocks.sh new file mode 100644 index 000000000..293345e6a --- /dev/null +++ b/base/mkinitramfs/files/30-blocks.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../mkinitramfs/files/30-blocks.sh +# Copyright (C) 2008 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. A copy of the +# GNU General Public License can be found in the file COPYING. +# --- SDE-COPYRIGHT-NOTE-END --- + + +# software raids +if [ -s "$root/etc/mdadm.conf" ]; then + echo "Injecting /etc/mdadm.conf" + cp -v "$root/etc/mdadm.conf" "$tmpdir/etc/" +fi + +# living volume groups? +if ls -1 "$root/etc/lvm/archive/"* > /dev/null 2>&1; then + echo "Injecting lvm's cache" + mkdir -p "$tmpdir/etc/lvm/"{cache,archive} + cp -v "$root/etc/lvm/cache/.cache" "$tmpdir/etc/lvm/cache/" +fi