Skip to content
Snippets Groups Projects
Commit f5760eec authored by Erik von Reis's avatar Erik von Reis
Browse files

rtcds: most commands now enforce lowercase models names

uppercase characters in model names cause problems with the build system, so they are forbidden for most commands.
parent 1acdd802
No related branches found
No related tags found
1 merge request!274rtcds improvements
...@@ -6,6 +6,7 @@ Changes for NEXT ...@@ -6,6 +6,7 @@ Changes for NEXT
- Fixed bug that leads to incorrect ordering of calculations, adding unneeded latency. - Fixed bug that leads to incorrect ordering of calculations, adding unneeded latency.
- 'rtcds restart --all' fixed to also restart IOP model. - 'rtcds restart --all' fixed to also restart IOP model.
- rtcds will now start every model listed on the command line even if some models are already started - rtcds will now start every model listed on the command line even if some models are already started
- rtcds now enforces lowercase model names on most commands
================================================================================================== ==================================================================================================
Changes for 4.2.3 Changes for 4.2.3
================================================================================================== ==================================================================================================
......
...@@ -364,6 +364,17 @@ disable_sys() { ...@@ -364,6 +364,17 @@ disable_sys() {
done done
} }
check_case() {
for sys ; do
lcsys=$(echo $sys | tr '[:upper:]' '[:lower:]')
if [ "$lcsys" != "$sys" ]
then
log "*** Error: ${sys} has uppercase letters. Model names must not have uppercase letters."
exit 3
fi
done
}
_lsmod() { _lsmod() {
local systems=($(list_host_sys)) local systems=($(list_host_sys))
local rts=(mbuf gpstime) local rts=(mbuf gpstime)
...@@ -603,6 +614,7 @@ case $cmd in ...@@ -603,6 +614,7 @@ case $cmd in
build_world build_world
elif [[ $1 ]] ; then elif [[ $1 ]] ; then
check_env check_env
check_case $@
prep_buildd prep_buildd
build_sys $@ build_sys $@
else else
...@@ -621,6 +633,7 @@ case $cmd in ...@@ -621,6 +633,7 @@ case $cmd in
install_world install_world
elif [[ $1 ]] ; then elif [[ $1 ]] ; then
check_env check_env
check_case $@
prep_target prep_target
install_sys $@ install_sys $@
else else
...@@ -632,6 +645,7 @@ case $cmd in ...@@ -632,6 +645,7 @@ case $cmd in
if [[ -n $ALL_FLAG ]] ; then if [[ -n $ALL_FLAG ]] ; then
start_sys $(list_host_sys) start_sys $(list_host_sys)
elif [[ $1 ]] ; then elif [[ $1 ]] ; then
check_case $@
start_sys $@ start_sys $@
else else
log "You must specify at least one system to start (or '--all')." log "You must specify at least one system to start (or '--all')."
...@@ -644,6 +658,7 @@ case $cmd in ...@@ -644,6 +658,7 @@ case $cmd in
stop_sys $(list_host_sys | tac) stop_sys $(list_host_sys | tac)
start_sys $(list_host_sys) start_sys $(list_host_sys)
elif [[ $1 ]] ; then elif [[ $1 ]] ; then
check_case $@
stop_sys $@ stop_sys $@
start_sys $@ start_sys $@
else else
...@@ -656,6 +671,7 @@ case $cmd in ...@@ -656,6 +671,7 @@ case $cmd in
# we do this in reverse so the IOP is stopped last # we do this in reverse so the IOP is stopped last
stop_sys $(list_host_sys | tac) stop_sys $(list_host_sys | tac)
elif [[ $1 ]] ; then elif [[ $1 ]] ; then
check_case $@
stop_sys $@ stop_sys $@
else else
log "You must specify at least one system to stop (or '--all')." log "You must specify at least one system to stop (or '--all')."
...@@ -672,6 +688,7 @@ case $cmd in ...@@ -672,6 +688,7 @@ case $cmd in
# we do this in reverse so the IOP is stopped last # we do this in reverse so the IOP is stopped last
${cmd}_sys $(list_host_sys | tac) ${cmd}_sys $(list_host_sys | tac)
elif [[ $1 ]] ; then elif [[ $1 ]] ; then
check_case $@
${cmd}_sys $@ ${cmd}_sys $@
else else
log "You must specify at least one system to $cmd (or '--all')." log "You must specify at least one system to $cmd (or '--all')."
...@@ -707,6 +724,7 @@ case $cmd in ...@@ -707,6 +724,7 @@ case $cmd in
log "You must specify system to view." log "You must specify system to view."
exit 2 exit 2
fi fi
check_case $1
olog="${RCG_BUILDD}/${1}.log" olog="${RCG_BUILDD}/${1}.log"
elog="${RCG_BUILDD}/${1}_error.log" elog="${RCG_BUILDD}/${1}_error.log"
echo $olog echo $olog
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment