diff options
| author | Daniel Baumann <daniel@debian.org> | 2009-01-22 17:39:39 +0100 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 17:48:03 +0100 |
| commit | d5b20626bc2cab7926097d39e6a8cba146dd361a (patch) | |
| tree | ac8f6d5a42bdb1f2b7742f1a4bbc18094e53a4fa /scripts | |
| parent | c85c0817670de8313325ab25c74bfff64a3349e3 (diff) | |
| download | live-boot-d5b20626bc2cab7926097d39e6a8cba146dd361a.tar.gz live-boot-d5b20626bc2cab7926097d39e6a8cba146dd361a.zip | |
Adding patch from Thierry Walrant <debian.tgc@walrant.net> to allow setting a path for the persistence files through persistent-path boot parameter (Closes: #512661).
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/live | 5 | ||||
| -rw-r--r-- | scripts/live-helpers | 11 |
2 files changed, 14 insertions, 2 deletions
diff --git a/scripts/live b/scripts/live index d06dd20..bf90781 100755 --- a/scripts/live +++ b/scripts/live @@ -340,6 +340,11 @@ Arguments () export PERSISTENT ;; + persistent-path=*) + PERSISTENT_PATH="${ARGUMENT#persistent-path=}" + export PERSISTENT_PATH + ;; + nopersistent) NOPERSISTENT="Yes" export NOPERSISTENT diff --git a/scripts/live-helpers b/scripts/live-helpers index 8875248..8970834 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -299,6 +299,13 @@ find_cow_device () cow_backing="/${pers_label}-backing" black_listed_devices="${2}" + if [ -z "${PERSISTENT_PATH}" ] + then + pers_fpath=${cow_backing}/${pers_label} + else + pers_fpath=${cow_backing}/${PERSISTENT_PATH}/${pers_label} + fi + for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram | grep -v fd) do for dev in $(subdevices "${sysblock}") @@ -332,9 +339,9 @@ find_cow_device () break fi - if [ -f "${cow_backing}/${pers_label}" ] + if [ -f "${pers_fpath}" ] then - echo $(setup_loop "${cow_backing}/${pers_label}" "loop" "/sys/block/loop*") + echo $(setup_loop "${pers_fpath}" "loop" "/sys/block/loop*") return 0 else umount ${cow_backing} |
