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.
This commit is contained in:
parent
be00fcd47b
commit
98841eb694
|
@ -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.'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue