osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-dev/+/33517 )
Change subject: net/templates/run: let user confirm close of tmux
......................................................................
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
---
M net/templates/run.sh
1 file changed, 21 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/17/33517/1
diff --git a/net/templates/run.sh b/net/templates/run.sh
index d4edbaa..e9f10de 100755
--- a/net/templates/run.sh
+++ b/net/templates/run.sh
@@ -8,6 +8,15 @@
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!"
--
To view, visit
https://gerrit.osmocom.org/c/osmo-dev/+/33517
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: I4a98e7eb7691b7b954ee7edd4ed488ae3c1dd835
Gerrit-Change-Number: 33517
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange