mirror of https://gerrit.osmocom.org/osmo-dev
net/templates/run: let user confirm close of tmux
Don't immediately close tmux on exit. Without this patch the error messages printed in error code paths are not visible to the user. Change-Id: I4a98e7eb7691b7b954ee7edd4ed488ae3c1dd835
This commit is contained in:
parent
aadee1a645
commit
2ee10b05d5
|
@ -8,6 +8,15 @@ if [ "${TERMINAL}" = "tmux" ] && [ "$1" != "inside-tmux" ]; then
|
|||
exec tmux new-session -s "$tmux_session" -n "RUN" "$0" "inside-tmux"
|
||||
fi
|
||||
|
||||
exit_confirm() {
|
||||
trap - EXIT INT TERM 0
|
||||
if [ "${TERMINAL}" = "tmux" ]; then
|
||||
echo "Hit enter to close tmux"
|
||||
read enter_to_continue
|
||||
fi
|
||||
}
|
||||
trap exit_confirm EXIT INT TERM 0
|
||||
|
||||
if ! ../fill_config.py --check-stale; then
|
||||
echo
|
||||
echo "WARNING: STALE CONFIGS - your net configs are older than the templates they should be based on!"
|
||||
|
|
Loading…
Reference in New Issue