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.
This commit is contained in:
Thomas Haller 2017-09-08 17:18:32 +02:00
parent 44e71d70ea
commit 66a09b2192

View file

@ -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