remove startup questions v3
cover remove startup questions v3
This version gets rid of some bashisms that made the startup script fail if dash was the default shell.
-b
The following changes since commit 6d78e09708ecb268ca10809ef6e8c9ea709d3ec4:
bitbake: toaster: display warnings for bad "IMAGE_FSTYPES" values (2015-10-06 16:46:52 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib bavery/toaster/startup_simplification_8217_v3
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/toaster/startup_simplification_8217_v3
brian avery (5):
toaster: removed superuser question from startup
toaster: remove layer and build dir interactive questions
toaster: check for configuration file and exit if not found
toaster: get rid of interactivity in bldcontrol
toaster: remove bashisms so script works in dash as well
bitbake/bin/toaster | 39 ++++-- .../management/commands/checksettings.py | 138 ++++++--------------- 2 files changed, 69 insertions(+), 108 deletions(-)
--
1.9.1
PATCH 1/5 toaster: removed superuser question from startup
added comment explaining how to create one later
--- bitbake/bin/toaster | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
bitbake/bin/toaster +4 -5
@@ -54,11 +54,10 @@ webserverStartAll() fi retval=0 - if [ "$TOASTER_MANAGED" '=' '1' ]; then - python $BBBASEDIR/lib/toaster/manage.py syncdb || retval=1 - else - python $BBBASEDIR/lib/toaster/manage.py syncdb --noinput || retval=1 - fi + # you can always add a superuser later via + # python bitbake/lib/toaster/manage.py python manage.py createsuperuser --username=<ME> + python $BBBASEDIR/lib/toaster/manage.py syncdb --noinput || retval=1 + python $BBBASEDIR/lib/toaster/manage.py migrate orm || retval=2 if [ $retval -eq 1 ]; then echo "Failed db sync, stopping system start" 1>&2
Signature · 1 line
1.9.1
PATCH 2/5 toaster: remove layer and build dir interactive questions
added TOASTER_CONF env var for toaasterconf.json
added TOASTER_DIR env var for working dir
added bugfix so WEB_PORT env variable is honored
--- bitbake/bin/toaster | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)
bitbake/bin/toaster +24 -1
@@ -162,7 +162,30 @@ RUNNING=0 NOTOASTERUI=0 WEBSERVER=1 TOASTER_BRBE="" -WEB_PORT="8000" +if [ "$WEB_PORT" == "" ]; then + WEB_PORT="8000" +fi +# this is the configuraton file we are using for toaster +# note default is assuming yocto. Override this if you are +# running in a pure OE environment and use the toasterconf.json +# in meta/conf/toasterconf.json +# note: for future there are a number of relative path assumptions +# in the local layers that currently prevent using an arbitrary +# toasterconf.json +if [ "$TOASTER_CONF" == "" ]; then + BIN_DIR=$(dirname "${BASH_SOURCE[0]}") + export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" +fi +# this defines the dir toaster will use for +# 1) clones of layers (in _toaster_clones ) +# 2) the build dir (in build) +# 3) the sqlite db if that is being used. +# 4) pid's we need to clean up on exit/shutdown +# note: for future. in order to make this an arbitrary directory, we need to +# make sure that the toaster.sqlite file doesn't default to `pwd` like it currently does. +export TOASTER_DIR=`pwd` + + NOBROWSER=0 for param in $*; do
Signature · 1 line
1.9.1
PATCH 3/5 toaster: check for configuration file and exit if not found
In reply to brian avery[YOCTO #8217]
--- bitbake/bin/toaster | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
bitbake/bin/toaster +5 -1
@@ -174,7 +174,11 @@ fi # toasterconf.json if [ "$TOASTER_CONF" == "" ]; then BIN_DIR=$(dirname "${BASH_SOURCE[0]}") - export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" + export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" +fi +if [ ! -f $TOASTER_CONF ]; then + echo "$TOASTER_CONF configuration file not found, exiting..." + exit -1 fi # this defines the dir toaster will use for # 1) clones of layers (in _toaster_clones )
Signature · 1 line
1.9.1
PATCH 4/5 toaster: get rid of interactivity in bldcontrol
In reply to brian averyremoved layer dir questions and base off TOASTER_DIR
removed build dir questions and base off TOASTER_DIR
base configuration file off of TOASTER_CONF
fixed some pylint issues
[YOCTO #8217]
--- bitbake/bin/toaster | 2 +- .../management/commands/checksettings.py | 138 ++++++--------------- 2 files changed, 38 insertions(+), 102 deletions(-)
bitbake/bin/toaster +1 -1
@@ -174,7 +174,7 @@ fi # toasterconf.json if [ "$TOASTER_CONF" == "" ]; then BIN_DIR=$(dirname "${BASH_SOURCE[0]}") - export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" + export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" fi if [ ! -f $TOASTER_CONF ]; then echo "$TOASTER_CONF configuration file not found, exiting..."
bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py +37 -101
209 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 5/5 toaster: remove bashisms so script works in dash as well
In reply to brian avery[YOCTO #8217]
--- bitbake/bin/toaster | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
bitbake/bin/toaster +4 -5
@@ -162,7 +162,7 @@ RUNNING=0 NOTOASTERUI=0 WEBSERVER=1 TOASTER_BRBE="" -if [ "$WEB_PORT" == "" ]; then +if [ "$WEB_PORT" = "" ]; then WEB_PORT="8000" fi # this is the configuraton file we are using for toaster
@@ -172,13 +172,13 @@ fi # note: for future there are a number of relative path assumptions # in the local layers that currently prevent using an arbitrary # toasterconf.json -if [ "$TOASTER_CONF" == "" ]; then - BIN_DIR=$(dirname "${BASH_SOURCE[0]}") +if [ "$TOASTER_CONF" = "" ]; then + BIN_DIR=$(dirname -- "$0") export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" fi if [ ! -f $TOASTER_CONF ]; then echo "$TOASTER_CONF configuration file not found, exiting..." - exit -1 + exit 1; fi # this defines the dir toaster will use for # 1) clones of layers (in _toaster_clones )
@@ -375,4 +375,3 @@ case $CMD in echo "Successful ${CMD}." ;; esac -
Signature · 1 line
1.9.1
Quoted 11 lines · On 07/10/2015 01:38, "[email protected] on behalf of brian…
This version gets rid of some bashisms that made the startup script fail if dash was the default shell.
-b
The following changes since commit
6d78e09708ecb268ca10809ef6e8c9ea709d3ec4:bitbake: toaster: display warnings for bad "
IMAGE_FSTYPES" values
(2015-10-06 16:46:52 +0100)
Quoted 7 lines
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib
bavery/toaster/startup_simplification_8217_v3http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/toaster/st
artup_simplification_8217_v3
This works for me now. Thanks!
Belén
Quoted 20 lines
brian avery (5):
toaster: removed superuser question from startup
toaster: remove layer and build dir interactive questions
toaster: check for configuration file and exit if not found
toaster: get rid of interactivity in bldcontrol
toaster: remove bashisms so script works in dash as wellbitbake/bin/toaster | 39 ++++--
.../management/commands/checksettings.py| 138
++++++---------------2 files changed, 69 insertions(+), 108 deletions(-)--
1.9.1Signature · 4 lines
_______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
Submitted upstream.
Quoted 32 lines · brian avery
This version gets rid of some bashisms that made the startup script fail if dash was the default shell.
-b
The following changes since commit
6d78e09708ecb268ca10809ef6e8c9ea709d3ec4:bitbake: toaster: display warnings for bad "
IMAGE_FSTYPES" values (2015-10-06 16:46:52 +0100)are available in the git repository at:
git://git.yoctoproject.org/poky-contribbavery/toaster/startup_simplification_8217_v3
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/toaster/startup_simplification_8217_v3brian avery (5):
toaster: removed superuser question from startup
toaster: remove layer and build dir interactive questions
toaster: check for configuration file and exit if not found
toaster: get rid of interactivity in bldcontrol
toaster: remove bashisms so script works in dash as wellbitbake/bin/toaster | 39 ++++-- .../management/commands/checksettings.py | 138 ++++++--------------- 2 files changed, 69 insertions(+), 108 deletions(-)--
1.9.1Signature · 4 lines
_______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
Signature · 3 lines
-- Regards, Ed