[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH initramfs-tools 07/10] local: Call local-block boot scripts to prepare additional block devices



Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 initramfs-tools.8 | 7 +++++++
 scripts/local     | 9 +++++++++
 2 files changed, 16 insertions(+)

diff --git a/initramfs-tools.8 b/initramfs-tools.8
index 1d48e66..01815b9 100644
--- a/initramfs-tools.8
+++ b/initramfs-tools.8
@@ -415,6 +415,13 @@ present (local) or the network interface is expected to be usable (NFS).
 
 .TP
 \fB\fI
+local-block
+These scripts are called with the name of a local device other than
+that used for root.  After these scripts have been executed, that
+device node is expected to be present.
+
+.TP
+\fB\fI
 local-premount OR nfs-premount
 are run after the sanity of the root device has been verified (local) or the
 network interface has been brought up (NFS), but before the actual root fs has
diff --git a/scripts/local b/scripts/local
index cb6b0f0..9a37236 100644
--- a/scripts/local
+++ b/scripts/local
@@ -10,6 +10,13 @@ local_top()
 	local_top_used=yes
 }
 
+local_block()
+{
+	[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-block"
+	run_scripts /scripts/local-block "$@"
+	[ "$quiet" != "y" ] && log_end_msg
+}
+
 local_premount()
 {
 	if [ "${local_premount_used}" != "yes" ]; then
@@ -147,6 +154,8 @@ local_mount_fs()
 	read_fstab_entry "$1"
 	MNT_FSNAME=$(resolve_device "$MNT_FSNAME")
 
+	local_block "$MNT_FSNAME"
+
 	local_device_setup "$MNT_FSNAME" "$1"
 
 	local_premount


-- 
Ben Hutchings
Anthony's Law of Force: Don't force it, get a larger hammer.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: