diff options
Diffstat (limited to 'utils/fakeroot.sh')
-rw-r--r-- | utils/fakeroot.sh | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/utils/fakeroot.sh b/utils/fakeroot.sh index a64e9631..6993365d 100644 --- a/utils/fakeroot.sh +++ b/utils/fakeroot.sh @@ -54,16 +54,12 @@ if [ $# -eq 0 ]; then set -- ${SHELL:-/bin/sh} fi -TARGET= -until [ $# -eq 0 ]; do - TARGET="${TARGET} '$(echo "$1" | sed -e "s/'/'\\\\''/g")'" - shift -done - # We exec settrans, which execs the "fakeauth" command in the chroot context. # The `pwd` is evaluated here and now, and that result interpreted inside # the shell running under fakeauth to chdir there inside the chroot world. # That shell then execs our arguments as a command line. exec /bin/settrans --chroot \ - /bin/fakeauth /bin/sh -c "cd `pwd`; exec ${TARGET}" \ + /bin/fakeauth \ + /bin/sh -c 'cd "$1" || exit ; shift ; exec "$@"' \ + "$1" "$PWD" "$@" \ -- / /hurd/fakeroot |