From 87be96092c061060fee524c7f18de53b88b183bc Mon Sep 17 00:00:00 2001 From: udeved Date: Fri, 8 Jan 2016 15:36:32 +0100 Subject: [PATCH 1/2] inc version --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 07bad54..0d0d47d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -Version=0.10.0 +Version=0.10.1 PREFIX = /usr/local SYSCONFDIR = /etc From c28c2cde18a3f483015c9bf39f599feb2f3250d3 Mon Sep 17 00:00:00 2001 From: udeved Date: Fri, 8 Jan 2016 19:37:15 +0100 Subject: [PATCH 2/2] [util-mount] tweak select_os(); cosmetics --- lib/util-mount.sh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/lib/util-mount.sh b/lib/util-mount.sh index acdea55..16e6325 100644 --- a/lib/util-mount.sh +++ b/lib/util-mount.sh @@ -50,27 +50,27 @@ select_os(){ msg "Detected systems:" local i=0 for os in ${os_list[@]};do - if [[ ${os##*:} == 'efi' ]];then - count=$((count-1)) - else - msg3 "$i) $(get_os_name $os)" - i=$((i+1)) - fi + local last=${os##*:} + case $last in + 'efi') count=$((count-1)) ;; + *) msg3 "$i) $(get_os_name $os)"; i=$((i+1)) ;; + esac done i=0 msg "Select system to mount [0-$((count-1))] : " - read selected + read select else - selected=0 + select=0 fi - local os_str=${os_list[$selected]} type + local os_str=${os_list[$select]} type type=$os_str root=${os_str%%:*} type=${type##*:} if [[ "${type##*:}" == 'linux' ]];then + msg "Mounting ($(get_os_name $os_str)) [$root]" chroot_mount_partitions "$1" "$root" else - die "You can't mount $selected!" + die "You can't mount $select!" fi } @@ -88,8 +88,7 @@ chroot_mount_partitions(){ for entry in ${mounts[@]}; do entry=${entry//UUID=} - local dev=${entry%:*} - local mp=${entry#*:} + local dev=${entry%:*} mp=${entry#*:} case "${entry#*:}" in '/'|'swap'|'none') continue ;; *) chroot_part_mount "/dev/disk/by-uuid/${dev}" "$1${mp}" ;;