Browse Source

fix: missing reference to ``GIT_0K_BASE`` led to failing script upon interactive login.

Now that we moved to a ``0k-ro`` preconfigured ssh target, this
script could not access ``git.0k.io`` without interactive process.
postgres
Valentin Lab 7 years ago
parent
commit
1b9be21de4
  1. 21
      precise/git/hooks/install

21
precise/git/hooks/install

@ -2,8 +2,14 @@
set -eux # -x for verbose logging to juju debug-log
## 0k git remote path
GIT_0K_BASE=${GIT_0K_BASE:-"0k-ro:/var/git"}
apt-get install -y --force-yes kal-shlib
## 0k git remote options
GIT_0K_CLONE_OPTIONS=${GIT_0K_CLONE_OPTIONS:-""}
apt-get install -y --force-yes kal-shlib-common
apt-get install -y bzr
@ -17,10 +23,11 @@ mkdir -p /opt/apps
## install git-hooks
##
(cd /opt/apps &&
git clone git.0k.io:/var/git/0k/git-hooks.git &&
git config --system git-hooks.install-dir /opt/apps/git-hooks &&
ln -sf /opt/apps/git-hooks/bin/git-hooks /usr/lib/git-core/git-hooks
(
cd /opt/apps &&
git clone "$GIT_0K_BASE"/0k/git-hooks.git &&
git config --system git-hooks.install-dir /opt/apps/git-hooks &&
ln -sf /opt/apps/git-hooks/bin/git-hooks /usr/lib/git-core/git-hooks
)
@ -71,7 +78,7 @@ ln -sf /opt/apps/git-bzr-ng/git-bzr /usr/lib/git-core/
(
cd /opt/apps &&
git clone git.0k.io:/var/git/0k/git-bzr-syncs.git &&
git clone "$GIT_0K_BASE"/0k/git-bzr-syncs.git &&
ln -sf /opt/apps/git-bzr-syncs/bin/git-bzr-syncs /usr/sbin/git-bzr-syncs
)
@ -92,5 +99,3 @@ mkdir $LXC_USER_HOME/.ssh -p &&
cat src/etc/ssh/lxc_git_access_id_rsa.pub >> $LXC_USER_HOME/.ssh/authorized_keys &&
chown lxc-user $LXC_USER_HOME/.ssh -R
Loading…
Cancel
Save