base-files: fix minor problem in init.d/boot
authorVasilis Tsiligiannis <acinonyx@openwrt.gr>
Tue, 5 Apr 2011 15:09:32 +0000 (15:09 +0000)
committerVasilis Tsiligiannis <acinonyx@openwrt.gr>
Tue, 5 Apr 2011 15:09:32 +0000 (15:09 +0000)
The script tests for the existance of /dev/root with test -e which fails if
/dev/root is a dangling symlink making the call to ln fail.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
SVN-Revision: 26483

package/base-files/files/etc/init.d/boot

index 7927af15431bd690b287ddbf14d6200e60e91693..12f382502ecef70475917c60d896d3ba823f7b7a 100755 (executable)
@@ -74,7 +74,7 @@ start() {
        done
 
        # create /dev/root if it doesn't exist
-       [ -e /dev/root ] || {
+       [ -e /dev/root -o -L /dev/root ] || {
                rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
                [ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
        }