Commit 98841eb6 authored by Dave Reisner's avatar Dave Reisner

common: remove unreachable statement

We run from a non-interactive shell, so the exec which is inevitably
called will replace the current process and 'die' will never run under
any circumstances.

This also fixes a bug with the su fallback which would cause multiple
arguments to be concatenated without any whitespace between them.
parent be00fcd4
......@@ -238,7 +238,6 @@ check_root() {
if type -P sudo >/dev/null; then
exec sudo -- "$@"
else
exec su root -c "$(printf '%q' "$@")"
exec su root -c "$(printf ' %q' "$@")"
fi
die 'This script must be run as root.'
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment