X-Git-Url: http://git.grml.org/?p=live-boot-grml.git;a=blobdiff_plain;f=backend%2Finitramfs-tools%2Flive.script;fp=backend%2Finitramfs-tools%2Flive.script;h=5bec7417b35ef5a557e9317bb7bcde8ae1bb6fef;hp=ff2915af5e6144a694d2805d85cda81a245599c7;hb=f35e0cfae2a2c7b15ed6a38211264b7b26b80a43;hpb=2a8ce242c18e10dffe2b8e1887df0b4fb8982d3b diff --git a/backend/initramfs-tools/live.script b/backend/initramfs-tools/live.script index ff2915a..5bec741 100755 --- a/backend/initramfs-tools/live.script +++ b/backend/initramfs-tools/live.script @@ -1,13 +1,59 @@ -#!/bin/sh - -#set -e +# Live system filesystem mounting -*- shell-script -*- . /bin/live-boot -. /scripts/functions +live_top() +{ + if [ "${live_top_used}" != "yes" ]; then + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/live-top" + run_scripts /scripts/live-top + [ "$quiet" != "y" ] && log_end_msg + fi + live_top_used=yes +} + +live_premount() +{ + if [ "${live_premount_used}" != "yes" ]; then + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/live-premount" + run_scripts /scripts/live-premount + [ "$quiet" != "y" ] && log_end_msg + fi + live_premount_used=yes +} + +live_bottom() +{ + if [ "${live_premount_used}" = "yes" ] || [ "${live_top_used}" = "yes" ]; then + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/live-bottom" + run_scripts /scripts/live-bottom + [ "$quiet" != "y" ] && log_end_msg + fi + live_premount_used=no + live_top_used=no +} + -mountroot () +mountroot() { # initramfs-tools entry point for live-boot is mountroot(); function Live } + +mount_top() +{ + # Note, also called directly in case it's overridden. + live_top +} + +mount_premount() +{ + # Note, also called directly in case it's overridden. + live_premount +} + +mount_bottom() +{ + # Note, also called directly in case it's overridden. + live_bottom +}