Skip to content
This repository was archived by the owner on Dec 11, 2018. It is now read-only.

Commit 1be38a2

Browse files
committed
contrib: fix variable substitution
1 parent 3c1c035 commit 1be38a2

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

contrib/add-tool.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ BASE_DN="dc=wmftest,dc=net"
99
TOOL_BASE_DN="ou=servicegroups,${BASE_DN}"
1010
ADMIN_DN="cn=admin,${BASE_DN}"
1111
ADMIN_PASS="vagrant_admin"
12-
MEMBER_DN=${2:=$ADMIN_DN}
12+
MEMBER_DN=${2:-$ADMIN_DN}
1313

1414
# Crappy random id generator
1515
NEW_GID=$(echo -n "${TOOL}" | sha1sum | awk '{print $1}' | tr '[:lower:]' '[:upper:]')

contrib/add-user.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Usage: add-user.sh SHELL_USER_NAME [WIKI_USER_NAME]
77

88
NEW_UID=${1:?SHELL_USER_NAME required}
9-
NEW_CN=${2:=$NEW_UID}
9+
NEW_CN=${2:-$NEW_UID}
1010
BASE_DN="dc=wmftest,dc=net"
1111
USER_BASE_DN="ou=People,${BASE_DN}"
1212
ADMIN_DN="cn=admin,${BASE_DN}"

contrib/del-tool.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
# Hack a tool into the testing LDAP server setup with MediaWiki-Vagrant's
3+
# role::striker.
4+
#
5+
# Usage: add-tool.sh NAME [DN_OF_MAINTAINER]
6+
7+
TOOL=${1:?TOOL required}
8+
BASE_DN="dc=wmftest,dc=net"
9+
TOOL_BASE_DN="ou=servicegroups,${BASE_DN}"
10+
ADMIN_DN="cn=admin,${BASE_DN}"
11+
ADMIN_PASS="vagrant_admin"
12+
13+
/usr/bin/ldapadd -x -D "${ADMIN_DN}" -w "${ADMIN_PASS}" <<LDIF
14+
dn: cn=tools.${TOOL},${TOOL_BASE_DN}
15+
changetype: delete
16+
LDIF

0 commit comments

Comments
 (0)