diff options
author | Thomas Haller <thaller@redhat.com> | 2017-09-08 17:18:32 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-09-08 17:18:32 +0200 |
commit | 66a09b21920679ade156ae6ed134476ddb73418a (patch) | |
tree | 73fc4ec04739053eb3b68d7dd13296194e465660 | |
parent | 44e71d70ea58501f8b9948b902d9505a6392b01b (diff) | |
download | NetworkManager-66a09b21920679ade156ae6ed134476ddb73418a.tar.gz |
contrib/NM-log: don't use exec in bash functions
When sourcing the file, using exec inside NM-show-journal is a bad idea,
because it replaces the calling shell.
-rwxr-xr-x | contrib/scripts/NM-log | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/scripts/NM-log b/contrib/scripts/NM-log index 82fdf4ba22..016437bee7 100755 --- a/contrib/scripts/NM-log +++ b/contrib/scripts/NM-log @@ -26,7 +26,7 @@ NM-show-journal() { echo "error detecting NM. Is it running?" systemctl status NetworkManager else - exec journalctl -o short-precise --since "$since" -b 0 -u NetworkManager "$@" + journalctl -o short-precise --since "$since" -b 0 -u NetworkManager "$@" fi } @@ -60,7 +60,7 @@ NM-log() { fi ) | \ NM-colorize | \ - LESS=FRSXM exec less -R + LESS=FRSXM less -R } if [[ "$NM_not_sourced" != "" ]]; then |