diff options
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-x | bitbake/bin/toaster | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster index 7e51014b7d..fc59fe5547 100755 --- a/bitbake/bin/toaster +++ b/bitbake/bin/toaster | |||
@@ -40,9 +40,16 @@ function webserverStartAll() | |||
40 | { | 40 | { |
41 | retval=0 | 41 | retval=0 |
42 | python $BBBASEDIR/lib/toaster/manage.py syncdb || retval=1 | 42 | python $BBBASEDIR/lib/toaster/manage.py syncdb || retval=1 |
43 | python $BBBASEDIR/lib/toaster/manage.py migrate orm || retval=2 | ||
43 | if [ $retval -eq 1 ]; then | 44 | if [ $retval -eq 1 ]; then |
44 | echo "Failed db sync, stopping system start" 1>&2 | 45 | echo "Failed db sync, stopping system start" 1>&2 |
45 | else | 46 | elif [ $retval -eq 2 ]; then |
47 | echo -e "\nError on migration, trying to recover... \n" | ||
48 | python $BBBASEDIR/lib/toaster/manage.py migrate orm 0001_initial --fake | ||
49 | retval=0 | ||
50 | python $BBBASEDIR/lib/toaster/manage.py migrate orm || retval=1 | ||
51 | fi | ||
52 | if [ $retval -eq 0 ]; then | ||
46 | python $BBBASEDIR/lib/toaster/manage.py runserver 0.0.0.0:8000 </dev/null >${BUILDDIR}/toaster_web.log 2>&1 & echo $! >${BUILDDIR}/.toastermain.pid | 53 | python $BBBASEDIR/lib/toaster/manage.py runserver 0.0.0.0:8000 </dev/null >${BUILDDIR}/toaster_web.log 2>&1 & echo $! >${BUILDDIR}/.toastermain.pid |
47 | fi | 54 | fi |
48 | return $retval | 55 | return $retval |
@@ -92,6 +99,13 @@ if ! echo "import django; print (1,5) == django.VERSION[0:2]" | python 2>/dev/nu | |||
92 | return 2 | 99 | return 2 |
93 | fi | 100 | fi |
94 | 101 | ||
102 | if ! echo "import south; print [0,8,4] == map(int,south.__version__.split(\".\"))" | python 2>/dev/null | grep True >/dev/null; then | ||
103 | echo -e "This program needs South 0.8.4. Please install with\n\nsudo pip install south==0.8.4" | ||
104 | return 2 | ||
105 | fi | ||
106 | |||
107 | |||
108 | |||
95 | 109 | ||
96 | 110 | ||
97 | # Determine the action. If specified by arguments, fine, if not, toggle it | 111 | # Determine the action. If specified by arguments, fine, if not, toggle it |