diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-10-29 16:04:57 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-10-29 16:04:57 +0000 |
commit | 040617e7fdd342de7f0d3bd9401535729a675a8e (patch) | |
tree | 7910f3f977adba3caa4a10fd7d5aacfd6e0c381f | |
parent | e85487169a542eac82244b448e9bb4882ee7a4da (diff) | |
download | alpine-conf-040617e7fdd342de7f0d3bd9401535729a675a8e.zip |
setup-bootable: don't replace alpine_dev with UUID by default
fixes #2258
-rw-r--r-- | setup-bootable.in | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/setup-bootable.in b/setup-bootable.in index f1d48b2..18e41bf 100644 --- a/setup-bootable.in +++ b/setup-bootable.in @@ -83,18 +83,17 @@ find_disk_dev() { usage() { cat <<__EOF__ $prog $version -usage: $prog [-hu] SOURCE [DEST] +usage: $prog [-fhUusv] SOURCE [DEST] Copy the contents of SOURCE to DEST and make DEST bootable. -SOURCE can be a directory or a ISO image. DEST can be a mounted directory +SOURCE can be a directory or a ISO image. DEST can be a mounted directory or a device. If DEST is ommitted /media/usb will be used. Options: -f Force overwrite existing files. Will overwrite syslinux.cfg if upgrade. -h Show this help. - -k Keep current alpine_dev in syslinux.cfg. Without this it will be replaced - with the UUID. + -U Replace current alpine_dev in syslinux.cfg with UUID if UUID found. -u Upgrade mode. Keep existing syslinux.cfg and don't run syslinux. -s Force run syslinux, even if upgrade mode. -v Verbose mode. Display whats going on. @@ -103,11 +102,11 @@ __EOF__ exit 1 } -while getopts "fhkusv" opt; do +while getopts "fhUusv" opt; do case "$opt" in f) force=1;; h) usage;; - k) keep_alpine_dev=1;; + U) replace_alpine_dev=1;; u) upgrade=1;; s) syslinux=1;; v) verbose=1;; @@ -257,7 +256,7 @@ for i in $tomove; do mv "$destdir"/.new/$i "$destdir"/ || die "Failed to move $destdir/.new/ to $destdir" done -if [ -z "$keep_alpine_dev" ] && [ -n "$UUID" ]; then +if [ -n "$replace_alpine_dev" ] && [ -n "$UUID" ]; then sed -i -e "s/alpine_dev=[^ \t:]\+/alpine_dev=UUID=$UUID/" \ "$destdir"/syslinux.cfg fi |