Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
58663df
)
Abort if the cd fails.
author
Wayne Davison
<wayned@samba.org>
Sat, 7 May 2011 19:58:11 +0000
(12:58 -0700)
committer
Wayne Davison
<wayned@samba.org>
Sat, 7 May 2011 20:01:21 +0000
(13:01 -0700)
support/lsh
patch
|
blob
|
blame
|
history
diff --git
a/support/lsh
b/support/lsh
index
8ccc5a2
..
b63444e
100755
(executable)
--- a/
support/lsh
+++ b/
support/lsh
@@
-24,10
+24,12
@@
if [ "$user" ]; then
prefix=''
if [ $do_cd = y ]; then
home=`perl -e "print((getpwnam('$user'))[7])"`
- prefix="cd '$home'
;
"
+ prefix="cd '$home'
&&
"
fi
sudo -H -u "$user" sh -c "$prefix $*"
else
- [ $do_cd = y ] && cd
+ if [ $do_cd = y ]; then
+ cd || exit 1
+ fi
eval "${@}"
fi