slitaz-boot-scripts rev 450

init: mount usb disks by uuid
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Mar 04 18:32:31 2018 +0100 (21 months ago)
parents 67c6e0935bba
children 161b43b7365c
files init
line diff
     1.1 --- a/init	Mon Dec 25 20:07:48 2017 +0100
     1.2 +++ b/init	Sun Mar 04 18:32:31 2018 +0100
     1.3 @@ -94,7 +94,7 @@
     1.4  }
     1.5  
     1.6  
     1.7 -mnt() {
     1.8 +bbmnt() {
     1.9  	r=$(busybox blkid 2> /dev/null | grep "$root[:\"]" | sed 's|:.*||;q')
    1.10  	r=${r:-$root}
    1.11  	if [ ! -b $r ]; then
    1.12 @@ -102,12 +102,17 @@
    1.13  		r=/dev/${r%%/*}
    1.14  	fi
    1.15  	d=${root#*$r}
    1.16 -	busybox mount $r $1 && return
    1.17 +	busybox mount $r $1
    1.18 +}
    1.19 +
    1.20 +
    1.21 +mnt() {
    1.22 +	bbmnt $1 && return
    1.23  	w=$(cat /sys/module/usb_storage/parameters/delay_use)
    1.24  	w=$((1+${w:-2}))
    1.25 -	echo -n "Sleep $w seconds..."
    1.26 +	echo "Sleep $w seconds..."
    1.27  	sleep $w
    1.28 -	busybox mount $r $1
    1.29 +	bbmnt $1
    1.30  }
    1.31  
    1.32