slitaz-boot-scripts rev 470

init: fix mount=/dev/cdrom
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu May 27 10:04:36 2021 +0000 (13 months ago)
parents 370e75b1a014
children 442c9f81919d
files init
line diff
     1.1 --- a/init	Wed May 26 19:47:08 2021 +0000
     1.2 +++ b/init	Thu May 27 10:04:36 2021 +0000
     1.3 @@ -99,13 +99,14 @@
     1.4  
     1.5  bbmnt() {
     1.6  	r=$(busybox blkid 2> /dev/null | grep "$root[:\"]" | sed 's|:.*||;q')
     1.7 +	r=${r:-$(busybox blkid $root 2> /dev/null | sed 's|:.*||;q')}
     1.8  	r=${r:-$root}
     1.9  	if [ ! -b $r ]; then
    1.10  		r=${r#/dev/}
    1.11  		r=/dev/${r%%/*}
    1.12  	fi
    1.13  	d=${root#*$r}
    1.14 -	t=$(busybox blkid 2> /dev/null | grep "$root[:\"]" | sed '/ TYPE=/!d;s/.* TYPE="//;s/".*//')
    1.15 +	t=$(busybox blkid $r 2> /dev/null | sed '/ TYPE=/!d;s/.* TYPE="//;s/".*//')
    1.16  	busybox mount $r $1 ${t:+-t $t}
    1.17  }
    1.18