From 66a09b21920679ade156ae6ed134476ddb73418a Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 8 Sep 2017 17:18:32 +0200 Subject: [PATCH] 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. --- contrib/scripts/NM-log | 4 ++-- 1 file 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