BSD compat changes
- openssh 5.6 doesn't like "ssh user@host" with no command following it, because they changed the rules for pty allocation failure. I'm calling this a BSD compat change because BSD hit it first, but really, the "ssh -T" will eventually be needed by Linuxes also, as they start upgrading to openssh 5.6 - FreeBSD (and I presume the other BSDs also) *require* a "-t" argument to mktemp (thanks to matias for finding this). Note that on FreeBSD, -t is a prefix (the X's are taken literally, and the real random stuff gets appended to the prefix), while on Linux, it is a template (the X's are converted to random characters). Thus, on BSD you will get names like /tmp/tmp.XXXXXXXXXX.1BAEGkHm, whereas on Linux you'll get /tmp/tmp.Aq7vbdNpGp or something.
This commit is contained in:
parent
0b6edbf7c2
commit
acfaa421d1
|
@ -70,7 +70,7 @@ export REPO_BASE
|
||||||
export GL_BINDIR
|
export GL_BINDIR
|
||||||
export GL_ADMINDIR
|
export GL_ADMINDIR
|
||||||
|
|
||||||
TEMPDIR=$(mktemp -d)
|
TEMPDIR=$(mktemp -d -t tmp.XXXXXXXXXX)
|
||||||
export TEMPDIR
|
export TEMPDIR
|
||||||
trap "/bin/rm -rf $TEMPDIR" 0
|
trap "/bin/rm -rf $TEMPDIR" 0
|
||||||
|
|
||||||
|
|
|
@ -437,7 +437,7 @@ setup_pta() {
|
||||||
PATH=\$PATH:$GIT_PATH
|
PATH=\$PATH:$GIT_PATH
|
||||||
GIT_WORK_TREE=$GL_ADMINDIR git add conf/gitolite.conf keydir
|
GIT_WORK_TREE=$GL_ADMINDIR git add conf/gitolite.conf keydir
|
||||||
GIT_WORK_TREE=$GL_ADMINDIR git diff --cached --quiet 2>/dev/null || GIT_WORK_TREE=$GL_ADMINDIR git commit -am start
|
GIT_WORK_TREE=$GL_ADMINDIR git diff --cached --quiet 2>/dev/null || GIT_WORK_TREE=$GL_ADMINDIR git commit -am start
|
||||||
" | ssh $p_port $user@$host
|
" | ssh -T $p_port $user@$host
|
||||||
|
|
||||||
# MANUAL: now that the admin repo is created, you have to set the hooks
|
# MANUAL: now that the admin repo is created, you have to set the hooks
|
||||||
# properly. The install program does this. So cd back to the
|
# properly. The install program does this. So cd back to the
|
||||||
|
|
|
@ -20,7 +20,7 @@ GL_PACKAGE_CONF=/tmp/share/gitolite/conf
|
||||||
|
|
||||||
die() { echo "$@"; exit 1; }
|
die() { echo "$@"; exit 1; }
|
||||||
|
|
||||||
TEMPDIR=$(mktemp -d)
|
TEMPDIR=$(mktemp -d -t tmp.XXXXXXXXXX)
|
||||||
export TEMPDIR
|
export TEMPDIR
|
||||||
trap "/bin/rm -rf $TEMPDIR" 0
|
trap "/bin/rm -rf $TEMPDIR" 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue