Commit d77c9a55 authored by Seblu's avatar Seblu
Browse files

system-upgrade: do not switch root before create screen

parent 6512d76c
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -72,14 +72,16 @@ main() {
    # parse command line options
    argparse "$@"

		# be root
		enforce_root "$@"

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

		# be root
		# -S to never start a screen as root (offer a root shell)
		# and sudo strip environment so we loose $STY or $TMUX variables
		enforce_root -S "$@"

		# relly do the job
		upgrade
}