From 6d3f4fd5557f5efc83c42374417f4a05e99d3744 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 5 Jun 2012 15:18:31 +0200 Subject: Moving out live-helpers from initramfs-tools specifics. --- bin/live-snapshot | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/live-snapshot b/bin/live-snapshot index 6ba45f2..e684824 100755 --- a/bin/live-snapshot +++ b/bin/live-snapshot @@ -37,7 +37,39 @@ else set -e fi -. /usr/share/initramfs-tools/scripts/live-helpers +## Begin FIXME: this is an embedded copy of the old 'live-helpers' initramfs script +if [ ! -x "/bin/fstype" ] +then + # klibc not in path -> not in initramfs + export PATH="${PATH}:/usr/lib/klibc/bin" +fi + +# handle upgrade path from old udev (using udevinfo) to +# recent versions of udev (using udevadm info) +if [ -x /sbin/udevadm ] +then + udevinfo='/sbin/udevadm info' +else + udevinfo='udevinfo' +fi + +old_root_overlay_label="live-rw" +old_home_overlay_label="home-rw" +custom_overlay_label="custom-ov" +root_snapshot_label="live-sn" +old_root_snapshot_label="live-sn" +home_snapshot_label="home-sn" +persistence_list="live-persistence.conf" + +# include all scripts for the time being until snapshots are either dropped or cleaned up +for _SCRIPT in /lib/live/boot/* +do + if [ -e "${_SCRIPT}" ] + then + . ${_SCRIPT} + fi +done +## End FIXME: this is an embedded copy of the old 'live-helpers' initramfs script LIVE_CONF="/etc/live/boot.d/snapshot.conf" -- cgit v1.2.3