From 2e70d7be610c9e45787c37352d36241de3c155d7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 2 Jul 2012 17:40:11 +0200 Subject: [PATCH] Renaming boot scripts for refactoring them into numbered plugins. --- scripts/boot.sh | 78 +++------------------- scripts/{boot.sh => boot/9990-aaa-fixme.sh} | 10 --- scripts/boot/{cmdline.sh => 9990-cmdline.sh} | 0 scripts/boot/{fstab.sh => 9990-fstab.sh} | 0 ...{initramfs-tools.sh => 9990-initramfs-tools.sh} | 0 .../boot/{misc-helpers.sh => 9990-misc-helpers.sh} | 0 scripts/boot/{mount-cifs.sh => 9990-mount-cifs.sh} | 0 scripts/boot/{mount-http.sh => 9990-mount-http.sh} | 0 .../boot/{mount-iscsi.sh => 9990-mount-iscsi.sh} | 0 scripts/boot/{mount-nfs.sh => 9990-mount-nfs.sh} | 0 scripts/boot/{mountroot.sh => 9990-mountroot.sh} | 0 scripts/boot/{netbase.sh => 9990-netbase.sh} | 0 scripts/boot/{netboot.sh => 9990-netboot.sh} | 0 scripts/boot/{networking.sh => 9990-networking.sh} | 0 scripts/boot/{overlay.sh => 9990-overlay.sh} | 0 scripts/boot/{read-only.sh => 9990-read-only.sh} | 0 ...ect-eth-device.sh => 9990-select-eth-device.sh} | 0 scripts/boot/{swapon.sh => 9990-swapon.sh} | 0 .../boot/{toram-todisk.sh => 9990-toram-todisk.sh} | 0 ...erify-checksums.sh => 9990-verify-checksums.sh} | 0 20 files changed, 11 insertions(+), 77 deletions(-) rewrite scripts/boot.sh (93%) copy scripts/{boot.sh => boot/9990-aaa-fixme.sh} (91%) rename scripts/boot/{cmdline.sh => 9990-cmdline.sh} (100%) rename scripts/boot/{fstab.sh => 9990-fstab.sh} (100%) rename scripts/boot/{initramfs-tools.sh => 9990-initramfs-tools.sh} (100%) rename scripts/boot/{misc-helpers.sh => 9990-misc-helpers.sh} (100%) rename scripts/boot/{mount-cifs.sh => 9990-mount-cifs.sh} (100%) rename scripts/boot/{mount-http.sh => 9990-mount-http.sh} (100%) rename scripts/boot/{mount-iscsi.sh => 9990-mount-iscsi.sh} (100%) rename scripts/boot/{mount-nfs.sh => 9990-mount-nfs.sh} (100%) rename scripts/boot/{mountroot.sh => 9990-mountroot.sh} (100%) rename scripts/boot/{netbase.sh => 9990-netbase.sh} (100%) rename scripts/boot/{netboot.sh => 9990-netboot.sh} (100%) rename scripts/boot/{networking.sh => 9990-networking.sh} (100%) rename scripts/boot/{overlay.sh => 9990-overlay.sh} (100%) rename scripts/boot/{read-only.sh => 9990-read-only.sh} (100%) rename scripts/boot/{select-eth-device.sh => 9990-select-eth-device.sh} (100%) rename scripts/boot/{swapon.sh => 9990-swapon.sh} (100%) rename scripts/boot/{toram-todisk.sh => 9990-toram-todisk.sh} (100%) rename scripts/boot/{verify-checksums.sh => 9990-verify-checksums.sh} (100%) diff --git a/scripts/boot.sh b/scripts/boot.sh dissimilarity index 93% index 9539496..c031f00 100755 --- a/scripts/boot.sh +++ b/scripts/boot.sh @@ -1,67 +1,11 @@ -#!/bin/sh - -# set -e - -if [ -e /scripts/functions ] -then - # initramfs-tools specific (FIXME) - . /scripts/functions -fi - -for _SCRIPT in /lib/live/boot/* -do - if [ -e "${_SCRIPT}" ] - then - . ${_SCRIPT} - fi -done - -export PATH="/root/usr/bin:/root/usr/sbin:/root/bin:/root/sbin:/usr/bin:/usr/sbin:/bin:/sbin" - -echo "/root/lib" >> /etc/ld.so.conf -echo "/root/usr/lib" >> /etc/ld.so.conf - -mountpoint="/live/image" -alt_mountpoint="/media" -LIVE_MEDIA_PATH="live" - -HOSTNAME="host" - -mkdir -p "${mountpoint}" -tried="/tmp/tried" - -# Create /etc/mtab for debug purpose and future syncs -if [ ! -d /etc ] -then - mkdir /etc/ -fi - -if [ ! -f /etc/mtab ] -then - touch /etc/mtab -fi - -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="persistence" -persistence_list="live-persistence.conf" - -if [ ! -f /live.vars ] -then - touch /live.vars -fi +#!/bin/sh + +# set -e + +for _SCRIPT in /lib/live/boot/????-* +do + if [ -e "${_SCRIPT}" ] + then + . ${_SCRIPT} + fi +done diff --git a/scripts/boot.sh b/scripts/boot/9990-aaa-fixme.sh similarity index 91% copy from scripts/boot.sh copy to scripts/boot/9990-aaa-fixme.sh index 9539496..77a291a 100755 --- a/scripts/boot.sh +++ b/scripts/boot/9990-aaa-fixme.sh @@ -1,21 +1,11 @@ #!/bin/sh -# set -e - if [ -e /scripts/functions ] then # initramfs-tools specific (FIXME) . /scripts/functions fi -for _SCRIPT in /lib/live/boot/* -do - if [ -e "${_SCRIPT}" ] - then - . ${_SCRIPT} - fi -done - export PATH="/root/usr/bin:/root/usr/sbin:/root/bin:/root/sbin:/usr/bin:/usr/sbin:/bin:/sbin" echo "/root/lib" >> /etc/ld.so.conf diff --git a/scripts/boot/cmdline.sh b/scripts/boot/9990-cmdline.sh similarity index 100% rename from scripts/boot/cmdline.sh rename to scripts/boot/9990-cmdline.sh diff --git a/scripts/boot/fstab.sh b/scripts/boot/9990-fstab.sh similarity index 100% rename from scripts/boot/fstab.sh rename to scripts/boot/9990-fstab.sh diff --git a/scripts/boot/initramfs-tools.sh b/scripts/boot/9990-initramfs-tools.sh similarity index 100% rename from scripts/boot/initramfs-tools.sh rename to scripts/boot/9990-initramfs-tools.sh diff --git a/scripts/boot/misc-helpers.sh b/scripts/boot/9990-misc-helpers.sh similarity index 100% rename from scripts/boot/misc-helpers.sh rename to scripts/boot/9990-misc-helpers.sh diff --git a/scripts/boot/mount-cifs.sh b/scripts/boot/9990-mount-cifs.sh similarity index 100% rename from scripts/boot/mount-cifs.sh rename to scripts/boot/9990-mount-cifs.sh diff --git a/scripts/boot/mount-http.sh b/scripts/boot/9990-mount-http.sh similarity index 100% rename from scripts/boot/mount-http.sh rename to scripts/boot/9990-mount-http.sh diff --git a/scripts/boot/mount-iscsi.sh b/scripts/boot/9990-mount-iscsi.sh similarity index 100% rename from scripts/boot/mount-iscsi.sh rename to scripts/boot/9990-mount-iscsi.sh diff --git a/scripts/boot/mount-nfs.sh b/scripts/boot/9990-mount-nfs.sh similarity index 100% rename from scripts/boot/mount-nfs.sh rename to scripts/boot/9990-mount-nfs.sh diff --git a/scripts/boot/mountroot.sh b/scripts/boot/9990-mountroot.sh similarity index 100% rename from scripts/boot/mountroot.sh rename to scripts/boot/9990-mountroot.sh diff --git a/scripts/boot/netbase.sh b/scripts/boot/9990-netbase.sh similarity index 100% rename from scripts/boot/netbase.sh rename to scripts/boot/9990-netbase.sh diff --git a/scripts/boot/netboot.sh b/scripts/boot/9990-netboot.sh similarity index 100% rename from scripts/boot/netboot.sh rename to scripts/boot/9990-netboot.sh diff --git a/scripts/boot/networking.sh b/scripts/boot/9990-networking.sh similarity index 100% rename from scripts/boot/networking.sh rename to scripts/boot/9990-networking.sh diff --git a/scripts/boot/overlay.sh b/scripts/boot/9990-overlay.sh similarity index 100% rename from scripts/boot/overlay.sh rename to scripts/boot/9990-overlay.sh diff --git a/scripts/boot/read-only.sh b/scripts/boot/9990-read-only.sh similarity index 100% rename from scripts/boot/read-only.sh rename to scripts/boot/9990-read-only.sh diff --git a/scripts/boot/select-eth-device.sh b/scripts/boot/9990-select-eth-device.sh similarity index 100% rename from scripts/boot/select-eth-device.sh rename to scripts/boot/9990-select-eth-device.sh diff --git a/scripts/boot/swapon.sh b/scripts/boot/9990-swapon.sh similarity index 100% rename from scripts/boot/swapon.sh rename to scripts/boot/9990-swapon.sh diff --git a/scripts/boot/toram-todisk.sh b/scripts/boot/9990-toram-todisk.sh similarity index 100% rename from scripts/boot/toram-todisk.sh rename to scripts/boot/9990-toram-todisk.sh diff --git a/scripts/boot/verify-checksums.sh b/scripts/boot/9990-verify-checksums.sh similarity index 100% rename from scripts/boot/verify-checksums.sh rename to scripts/boot/9990-verify-checksums.sh -- 2.11.4.GIT