slitaz-boot-scripts rev 411

init: partitonless support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Aug 27 14:32:34 2015 +0200 (2015-08-27)
parents f9871e7a85b4
children 5f5c78d24bfd
files init
line diff
     1.1 --- a/init	Wed Aug 26 19:01:52 2015 +0200
     1.2 +++ b/init	Thu Aug 27 14:32:34 2015 +0200
     1.3 @@ -91,7 +91,7 @@
     1.4  
     1.5  mnt()
     1.6  {
     1.7 -r=$(busybox blkid 2> /dev/null | sed "s|\"||g;/$(echo $root | sed 's|/|.|g')/!d;s|:.*||;q")
     1.8 +r=$(busybox blkid 2> /dev/null | sed "s|\"||g;/${root//[^a-zA-Z0-9]/.}/!d;s|:.*||;q")
     1.9  r=${r:-$root}
    1.10  if [ ! -b $r ]; then
    1.11  	r=${r#/dev/}
    1.12 @@ -177,6 +177,7 @@
    1.13  	sh
    1.14  fi
    1.15  for i in /sys/block/*/dev /sys/block/*/*/dev ; do
    1.16 +	[ -s "$i" ] || continue
    1.17  	n=${i%/dev}
    1.18  	n=/dev/${n##*/}
    1.19  	[ -e $n ] && continue