Commit 6512d76c authored by Seblu's avatar Seblu
Browse files

system-upgrade: do not start screen inside a screen or tmux

parent 78504051
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ argparse() {
    local opt
    while getopts 'hS' opt; do
        case $opt in
            S) SCREEN=0;;
            S) SCREEN='';;
            *) usage;;
        esac
    done
@@ -75,7 +75,8 @@ main() {
		# be root
		enforce_root "$@"

		if [[ "$SCREEN" ]] && type -P $SCREEN >/dev/null; then
		if [[ -z "$STY" && -z "$TMUX" && -n "$SCREEN" ]] && type -P $SCREEN >/dev/null
		then
			exec $SCREEN "$0" -S "$@"
		fi