aboutgitcode
diff options
context:
space:
mode:
-rwxr-xr-xmbuto19
1 files changed, 10 insertions, 9 deletions
diff --git a/mbuto b/mbuto
index ef5faf7..99b0e2d 100755
--- a/mbuto
+++ b/mbuto
@@ -916,14 +916,7 @@ usage() {
################################################################################
-# Entry point: if we're not running as root, re-run with fakeroot
-if [ "${LD_PRELOAD}" != "libfakeroot-sysv.so" ] && [ "$(id -u)" -ne 0 ]; then
- if ! FAKEROOT="$(command -v fakeroot)"; then
- err "Not root and no fakeroot available, exiting"
- fi
- PATH="${PATH}:/sbin:/usr/sbin" "${FAKEROOT}" "${0}" "$@"
- exit ${?}
-fi
+ARGS=${@}
# Parse options
while getopts c:df:k:m:p:s:vh __opt; do
@@ -940,9 +933,17 @@ while getopts c:df:k:m:p:s:vh __opt; do
esac
done
shift $((OPTIND - 1))
-
[ -z "${PROFILE}" ] && PROFILE="base"
+# If we're not running as root, re-run with fakeroot
+if [ "${LD_PRELOAD}" != "libfakeroot-sysv.so" ] && [ "$(id -u)" -ne 0 ]; then
+ if ! FAKEROOT="$(command -v fakeroot)"; then
+ err "Not root and no fakeroot available, exiting"
+ fi
+ PATH="${PATH}:/sbin:/usr/sbin" "${FAKEROOT}" "${0}" ${ARGS}
+ exit ${?}
+fi
+
# Check needed tools, exit if any is missing
for __l in ${TOOLS}; do
cmd_check "${__l}"