From 80af6263a36436d04d4f98cee1b8f025db262cd5 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Fri, 5 Jan 2024 13:54:15 +0100 Subject: [PATCH] envrc: Kill shell when accessing repo from eduroam --- meta/envrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta/envrc b/meta/envrc index ee4ca80..220088d 100644 --- a/meta/envrc +++ b/meta/envrc @@ -3,6 +3,12 @@ envrc() { git fetch --all } +# Stop configuring when in eduraom, you have probably other stuff to do! +if nmcli con show --active | grep -q eduroam; then + parent_shell=$(ps -eo ppid= -q $PPID) + [ -z "$parent_shell" ] || kill -KILL $parent_shell +fi + # Run in background envrc 0<&- &>/dev/null 3>&- & disown