git.annexia.org
/
febootstrap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update gnulib.
[febootstrap.git]
/
febootstrap-run.sh
diff --git
a/febootstrap-run.sh
b/febootstrap-run.sh
index
60cf021
..
6c5e9b9
100755
(executable)
--- a/
febootstrap-run.sh
+++ b/
febootstrap-run.sh
@@
-63,15
+63,24
@@
fi
target="$1"
shift
target="$1"
shift
-if [ ! -f "$target"/fakeroot.log ]; then
+if [ $(id -u) -eq 0 ]; then
+ chroot "$target" "$@"
+ exit 0
+fi
+
+if [ $(id -u) -ne 0 -a ! -f "$target"/fakeroot.log ]; then
echo "febootstrap-run: $target: not a root filesystem"
exit 1
fi
if [ "$readonly" = "no" ]; then
echo "febootstrap-run: $target: not a root filesystem"
exit 1
fi
if [ "$readonly" = "no" ]; then
- fakeroot -i "$target"/fakeroot.log -s "$target"/fakeroot.log \
- fakechroot -s \
+ if [ $(id -u) -ne 0 ]; then
+ fakeroot -i "$target"/fakeroot.log -s "$target"/fakeroot.log \
+ fakechroot -s \
+ chroot "$target" "$@"
+ else
chroot "$target" "$@"
chroot "$target" "$@"
+ fi
else
fakeroot -i "$target"/fakeroot.log \
fakechroot -s \
else
fakeroot -i "$target"/fakeroot.log \
fakechroot -s \