|
Lines 167-172
Link Here
|
| 167 |
progress_msg "$(gettext "Preparing domain join")" |
167 |
progress_msg "$(gettext "Preparing domain join")" |
| 168 |
progress_next_step |
168 |
progress_next_step |
| 169 |
|
169 |
|
|
|
170 |
failed_message () { |
| 171 |
## Code copied from univention-join, FIXME: refactor into library function |
| 172 |
echo "" |
| 173 |
echo "" |
| 174 |
echo "**************************************************************************" |
| 175 |
echo "* Join failed! *" |
| 176 |
echo "* Contact your system administrator *" |
| 177 |
echo "**************************************************************************" |
| 178 |
echo "* Message: $@" |
| 179 |
echo "**************************************************************************" |
| 180 |
## NOTE: differs from univention-join: do not exit here |
| 181 |
} |
| 182 |
|
| 170 |
# Call join |
183 |
# Call join |
| 171 |
if [ -d /var/lib/univention-ldap/ldap ]; then |
184 |
if [ -d /var/lib/univention-ldap/ldap ]; then |
| 172 |
rm -f /var/lib/univention-ldap/ldap/* |
185 |
rm -f /var/lib/univention-ldap/ldap/* |
|
Lines 181-194
Link Here
|
| 181 |
ln -sf /var/univention-join/status /usr/lib/univention-install/.index.txt |
194 |
ln -sf /var/univention-join/status /usr/lib/univention-install/.index.txt |
| 182 |
|
195 |
|
| 183 |
for i in /usr/lib/univention-install/*.inst; do |
196 |
for i in /usr/lib/univention-install/*.inst; do |
| 184 |
echo "Configure $i" |
197 |
echo "Configure $i" 2>&1 | tee -a /var/log/univention/join.log |
| 185 |
$i |
198 |
if ! "$i" 2>&1 | tee -a /var/log/univention/join.log |
|
|
199 |
then |
| 200 |
failed_message "FAILED: $(basename "$i")" |
| 201 |
fi |
| 186 |
done |
202 |
done |
| 187 |
else |
203 |
else |
| 188 |
if [ -n "$dcaccount" -a -n "$password_file" ]; then |
204 |
if [ -n "$dcaccount" -a -n "$password_file" ]; then |
| 189 |
# Copy to a temporary password file, because univention-join |
205 |
# Copy to a temporary password file, because univention-join |
| 190 |
# will copy the file to the same directory on the master |
206 |
# will copy the file to the same directory on the master |
| 191 |
# with the given user credentials. This won't work. |
207 |
# with the given user credentials. This will not work. |
| 192 |
pwd_file="$(mktemp)" |
208 |
pwd_file="$(mktemp)" |
| 193 |
cp "$password_file" "$pwd_file" |
209 |
cp "$password_file" "$pwd_file" |
| 194 |
/usr/share/univention-join/univention-join -dcaccount "$dcaccount" -dcpwd "$pwd_file" |
210 |
/usr/share/univention-join/univention-join -dcaccount "$dcaccount" -dcpwd "$pwd_file" |