Merge branch 'devel' of github.com:manjaro/manjaro-tools into devel

This commit is contained in:
udeved 2016-01-09 14:40:51 +01:00
commit ef24110d49
2 changed files with 12 additions and 13 deletions

View file

@ -1,4 +1,4 @@
Version=0.10.0 Version=0.10.1
PREFIX = /usr/local PREFIX = /usr/local
SYSCONFDIR = /etc SYSCONFDIR = /etc

View file

@ -50,27 +50,27 @@ select_os(){
msg "Detected systems:" msg "Detected systems:"
local i=0 local i=0
for os in ${os_list[@]};do for os in ${os_list[@]};do
if [[ ${os##*:} == 'efi' ]];then local last=${os##*:}
count=$((count-1)) case $last in
else 'efi') count=$((count-1)) ;;
msg3 "$i) $(get_os_name $os)" *) msg3 "$i) $(get_os_name $os)"; i=$((i+1)) ;;
i=$((i+1)) esac
fi
done done
i=0 i=0
msg "Select system to mount [0-$((count-1))] : " msg "Select system to mount [0-$((count-1))] : "
read selected read select
else else
selected=0 select=0
fi fi
local os_str=${os_list[$selected]} type local os_str=${os_list[$select]} type
type=$os_str type=$os_str
root=${os_str%%:*} root=${os_str%%:*}
type=${type##*:} type=${type##*:}
if [[ "${type##*:}" == 'linux' ]];then if [[ "${type##*:}" == 'linux' ]];then
msg "Mounting ($(get_os_name $os_str)) [$root]"
chroot_mount_partitions "$1" "$root" chroot_mount_partitions "$1" "$root"
else else
die "You can't mount $selected!" die "You can't mount $select!"
fi fi
} }
@ -88,8 +88,7 @@ chroot_mount_partitions(){
for entry in ${mounts[@]}; do for entry in ${mounts[@]}; do
entry=${entry//UUID=} entry=${entry//UUID=}
local dev=${entry%:*} local dev=${entry%:*} mp=${entry#*:}
local mp=${entry#*:}
case "${entry#*:}" in case "${entry#*:}" in
'/'|'swap'|'none') continue ;; '/'|'swap'|'none') continue ;;
*) chroot_part_mount "/dev/disk/by-uuid/${dev}" "$1${mp}" ;; *) chroot_part_mount "/dev/disk/by-uuid/${dev}" "$1${mp}" ;;