# HG changeset patch # User Pascal Bellard # Date 1346061176 -7200 # Node ID 1e0edc428ca9d724c262f19a1fe76be3ce1b145e # Parent 41a7bf957ee3444b985637d20858b4ad362c5808 init: fix cdromless case diff -r 41a7bf957ee3 -r 1e0edc428ca9 init --- a/init Sun Aug 26 18:01:52 2012 +0200 +++ b/init Mon Aug 27 11:52:56 2012 +0200 @@ -31,7 +31,7 @@ msg() { -echo "Switching / to $1 ..." +echo "Switching / to $1..." } use() @@ -118,7 +118,7 @@ . /run/init sh fi -ln -s "$(sed '/name/!ds/.*:[^a-z]*//' /proc/sys/dev/cdrom/info)" /dev/cdrom +ln -s $(sed '/name/!ds/.*:[^a-z]*//' /proc/sys/dev/cdrom/info) /dev/cdrom if use dmraid then dmraid -s|sed '/^type/!ds/.*: *//'|ldraid [ ${root:0:4} = /dev ] || @@ -149,7 +149,7 @@ fi got loopfs && echo "Into file $root..." && losetup /dev/loop0 /mnt/$root && mount /dev/loop0 /mnt -got bindfs && echo "Bind ${root/,/ to } ..." && +got bindfs && echo "Bind ${root/,/ to }..." && mount --bind /mnt/${root%,*} /mnt/${root/,//} arg cryptoroot= && tryinit if use subroot @@ -169,7 +169,7 @@ mount -t tmpfs -o size=$root tmpfs /mnt && for i in $(ls -ar /) do case "$i" in - .*) ;; + .*|cdrom) ;; mnt|proc|sys) mkdir /mnt/$i;; usr|var|rootfs*) mv /$i /mnt;; *) cp -a /$i /mnt 2>/dev/null && continue