summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/initrdscripts/files/init-live.sh22
1 files changed, 21 insertions, 1 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
index c591f0d386..e8d7f70c2c 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -45,7 +45,13 @@ read_args() {
45 console_params=$arg 45 console_params=$arg
46 else 46 else
47 console_params="$console_params $arg" 47 console_params="$console_params $arg"
48 fi 48 fi ;;
49 debugshell*)
50 if [ -z "$optarg" ]; then
51 shelltimeout=30
52 else
53 shelltimeout=$optarg
54 fi
49 esac 55 esac
50 done 56 done
51} 57}
@@ -75,6 +81,7 @@ early_setup
75read_args 81read_args
76 82
77echo "Waiting for removable media..." 83echo "Waiting for removable media..."
84C=0
78while true 85while true
79do 86do
80 for i in `ls /media 2>/dev/null`; do 87 for i in `ls /media 2>/dev/null`; do
@@ -90,6 +97,19 @@ do
90 if [ "$found" = "yes" ]; then 97 if [ "$found" = "yes" ]; then
91 break; 98 break;
92 fi 99 fi
100 # don't wait for more than $shelltimeout seconds, if it's set
101 if [ -n "$shelltimeout" ]; then
102 echo -n " " $(( $shelltimeout - $C ))
103 if [ $C -ge $shelltimeout ]; then
104 echo "..."
105 echo "Mounted filesystems"
106 mount | grep media
107 echo "Available block devices"
108 ls /dev/sd*
109 fatal "Cannot find rootfs.img file in /media/* , dropping to a shell "
110 fi
111 C=$(( C + 1 ))
112 fi
93 sleep 1 113 sleep 1
94done 114done
95 115