slitaz-boot-scripts rev 317
init: fix cdromless case
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Aug 27 11:52:56 2012 +0200 (2012-08-27) |
parents | 41a7bf957ee3 |
children | a4e4a4784e45 |
files | init |
line diff
1.1 --- a/init Sun Aug 26 18:01:52 2012 +0200 1.2 +++ b/init Mon Aug 27 11:52:56 2012 +0200 1.3 @@ -31,7 +31,7 @@ 1.4 1.5 msg() 1.6 { 1.7 -echo "Switching / to $1 ..." 1.8 +echo "Switching / to $1..." 1.9 } 1.10 1.11 use() 1.12 @@ -118,7 +118,7 @@ 1.13 . /run/init 1.14 sh 1.15 fi 1.16 -ln -s "$(sed '/name/!ds/.*:[^a-z]*//' /proc/sys/dev/cdrom/info)" /dev/cdrom 1.17 +ln -s $(sed '/name/!ds/.*:[^a-z]*//' /proc/sys/dev/cdrom/info) /dev/cdrom 1.18 if use dmraid 1.19 then dmraid -s|sed '/^type/!ds/.*: *//'|ldraid 1.20 [ ${root:0:4} = /dev ] || 1.21 @@ -149,7 +149,7 @@ 1.22 fi 1.23 got loopfs && echo "Into file $root..." && 1.24 losetup /dev/loop0 /mnt/$root && mount /dev/loop0 /mnt 1.25 -got bindfs && echo "Bind ${root/,/ to } ..." && 1.26 +got bindfs && echo "Bind ${root/,/ to }..." && 1.27 mount --bind /mnt/${root%,*} /mnt/${root/,//} 1.28 arg cryptoroot= && tryinit 1.29 if use subroot 1.30 @@ -169,7 +169,7 @@ 1.31 mount -t tmpfs -o size=$root tmpfs /mnt && 1.32 for i in $(ls -ar /) 1.33 do case "$i" in 1.34 - .*) ;; 1.35 + .*|cdrom) ;; 1.36 mnt|proc|sys) mkdir /mnt/$i;; 1.37 usr|var|rootfs*) mv /$i /mnt;; 1.38 *) cp -a /$i /mnt 2>/dev/null && continue