aboutgitcode
diff options
context:
space:
mode:
-rwxr-xr-xmbuto12
1 files changed, 9 insertions, 3 deletions
diff --git a/mbuto b/mbuto
index 49b8139..6918415 100755
--- a/mbuto
+++ b/mbuto
@@ -1179,10 +1179,11 @@ usage() {
# 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"
+ __fakeroot_missing="y"
+ else
+ PATH="${PATH}:/sbin:/usr/sbin" "${FAKEROOT}" "${0}" "${@}"
+ exit ${?}
fi
- PATH="${PATH}:/sbin:/usr/sbin" "${FAKEROOT}" "${0}" "${@}"
- exit ${?}
fi
# Parse options
@@ -1206,6 +1207,11 @@ done
shift $((OPTIND - 1))
[ -z "${PROFILE}" ] && PROFILE="base"
+if [ "${__fakeroot_missing}" = "y" ]; then
+ err "Not root and no fakeroot available, exiting"
+ exit 1
+fi
+
# Check needed tools, exit if any is missing
for __l in ${TOOLS}; do
cmd_check "${__l}"