Merge branch 'hotfix-0.3.1' into stable

This commit is contained in:
Bertrand Gouny committed 2014-05-07 08:29:57 +02:00
commit c057d3c2ac
5 files changed
+25 -13

No files matched your search

+9 -8
View File
@@ -6,15 +6,15 @@ status () {
echo "---> ${@}" >&2 echo "---> ${@}" >&2
} }
set -x
: LDAP_ADMIN_PWD=${LDAP_ADMIN_PWD}
: LDAP_DOMAIN=${LDAP_DOMAIN}
: LDAP_ORGANISATION=${LDAP_ORGANISATION}
if [ ! -e /var/lib/ldap/docker_bootstrapped ]; then if [ ! -e /var/lib/ldap/docker_bootstrapped ]; then
status "configuring slapd for first run" status "configuring slapd for first run"
set -x
: LDAP_ADMIN_PWD=${LDAP_ADMIN_PWD}
: LDAP_DOMAIN=${LDAP_DOMAIN}
: LDAP_ORGANISATION=${LDAP_ORGANISATION}
# permission error on /etc/ldap/slapd.conf if not set?! :'( # permission error on /etc/ldap/slapd.conf if not set?! :'(
adduser openldap root adduser openldap root
@@ -37,7 +37,6 @@ EOF
dpkg-reconfigure -f noninteractive slapd dpkg-reconfigure -f noninteractive slapd
############ Custom config ############ ############ Custom config ############
slapd -h "ldap:/// ldapi:///" -u openldap -g openldap slapd -h "ldap:/// ldapi:///" -u openldap -g openldap
chown -R openldap:openldap /etc/ldap chown -R openldap:openldap /etc/ldap
@@ -60,7 +59,7 @@ EOF
fi fi
# Replication # Replication
# todo # todo :)
# Other config files # Other config files
for f in $(find /etc/ldap/config -maxdepth 1 -name \*.ldif -type f); do for f in $(find /etc/ldap/config -maxdepth 1 -name \*.ldif -type f); do
@@ -70,6 +69,8 @@ EOF
kill -INT `cat /run/slapd/slapd.pid` kill -INT `cat /run/slapd/slapd.pid`
unset LDAP_ADMIN_PWD
touch /var/lib/ldap/docker_bootstrapped touch /var/lib/ldap/docker_bootstrapped
else else
+2 -2
View File
@@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
sudo docker.io build -t openldap-test . #sudo docker.io build -t openldap-test .
#sudo docker.io build --no-cache=true -t openldap-test . sudo docker.io build --no-cache=true -t openldap-test .
+3 -3
View File
@@ -1,11 +1,11 @@
#!/bin/sh #!/bin/sh
# remove openldap test container # remove openldap test container
sudo docker.io ps -a > testcontainer.out docker.io ps -a > testcontainer.out
if [ "$(grep -c "openldap-test-container" ./testcontainer.out)" -ne 0 ]; then if [ "$(grep -c "openldap-test-container" ./testcontainer.out)" -ne 0 ]; then
sudo docker.io stop openldap-test-container docker.io stop openldap-test-container
sudo docker.io rm openldap-test-container docker.io rm openldap-test-container
fi fi
rm testcontainer.out rm testcontainer.out
+10
View File
@@ -0,0 +1,10 @@
#!/bin/sh
# remove openldap test image
docker.io images > testimage.out
if [ "$(grep -c "openldap-test" ./testimage.out)" -ne 0 ]; then
docker.io rmi openldap-test
fi
rm testimage.out
+1
View File
@@ -1,3 +1,4 @@
#!/bin/sh #!/bin/sh
./test/tools/delete-container.sh ./test/tools/delete-container.sh
./test/tools/delete-image.sh