|
64 |
local namejoinscript |
64 |
local namejoinscript |
65 |
namejoinscript="$1" |
65 |
namejoinscript="$1" |
66 |
shift |
66 |
shift |
67 |
local role="$(ucr get server/role)" |
67 |
local role="$(/usr/sbin/univention-config-registry get server/role)" |
68 |
if [ "$role" = "domaincontroller_master" -o "$role" = "domaincontroller_backup" ] ; then |
68 |
if [ "$role" = "domaincontroller_master" -o "$role" = "domaincontroller_backup" ] ; then |
69 |
echo "Calling joinscript $namejoinscript ..." |
69 |
echo "Calling joinscript $namejoinscript ..." |
70 |
"$joinscript" "$@" |
70 |
"$joinscript" "$@" |
|
124 |
|
124 |
|
125 |
if [ -x "$joinscript" ] ; then |
125 |
if [ -x "$joinscript" ] ; then |
126 |
shift |
126 |
shift |
127 |
local role="$(ucr get server/role)" |
127 |
local role="$(/usr/sbin/univention-config-registry get server/role)" |
128 |
if [ "$role" = "domaincontroller_master" -o "$role" = "domaincontroller_backup" ] ; then |
128 |
if [ "$role" = "domaincontroller_master" -o "$role" = "domaincontroller_backup" ] ; then |
129 |
"$joinscript" "$@" && delete_unjoinscript "${joinscript_name}" |
129 |
"$joinscript" "$@" && delete_unjoinscript "${joinscript_name}" |
130 |
fi |
130 |
fi |
|
142 |
joinscript="/usr/lib/univention-install/$1" |
142 |
joinscript="/usr/lib/univention-install/$1" |
143 |
if [ -x "$joinscript" ] ; then |
143 |
if [ -x "$joinscript" ] ; then |
144 |
shift |
144 |
shift |
145 |
if [ "$(ucr get server/role)" = "domaincontroller_master" ] ; then |
145 |
if [ "$(/usr/sbin/univention-config-registry get server/role)" = "domaincontroller_master" ] ; then |
146 |
"$joinscript" "$@" |
146 |
"$joinscript" "$@" |
147 |
fi |
147 |
fi |
148 |
fi |
148 |
fi |
|
169 |
# fi |
169 |
# fi |
170 |
# |
170 |
# |
171 |
is_domain_controller () { |
171 |
is_domain_controller () { |
172 |
case "$(ucr get server/role)" in |
172 |
case "$(/usr/sbin/univention-config-registry get server/role)" in |
173 |
domaincontroller_master) return 0 ;; |
173 |
domaincontroller_master) return 0 ;; |
174 |
domaincontroller_backup) return 0 ;; |
174 |
domaincontroller_backup) return 0 ;; |
175 |
domaincontroller_slave) return 0 ;; |
175 |
domaincontroller_slave) return 0 ;; |
|
230 |
# create passwort |
230 |
# create passwort |
231 |
# |
231 |
# |
232 |
create_machine_password () { |
232 |
create_machine_password () { |
233 |
local length="$(ucr get machine/password/length)" |
233 |
local length="$(/usr/sbin/univention-config-registry get machine/password/length)" |
234 |
local compl="$(ucr get machine/password/complexity)" |
234 |
local compl="$(/usr/sbin/univention-config-registry get machine/password/complexity)" |
235 |
|
235 |
|
236 |
if [ -z "$length" ]; then |
236 |
if [ -z "$length" ]; then |
237 |
length=20 |
237 |
length=20 |
|
266 |
ucr_varname="$(echo "$name" | tr [A-Z] [a-z] | sed 's| ||g')" |
266 |
ucr_varname="$(echo "$name" | tr [A-Z] [a-z] | sed 's| ||g')" |
267 |
ucr_varname="users/default/$ucr_varname" |
267 |
ucr_varname="users/default/$ucr_varname" |
268 |
|
268 |
|
269 |
result="$(ucr get "$ucr_varname")" |
269 |
result="$(/usr/sbin/univention-config-registry get "$ucr_varname")" |
270 |
if [ -n "$result" ]; then |
270 |
if [ -n "$result" ]; then |
271 |
echo -n "$result" |
271 |
echo -n "$result" |
272 |
else |
272 |
else |
|
285 |
ucr_varname="$(echo "$name" | tr [A-Z] [a-z] | sed 's| ||g')" |
285 |
ucr_varname="$(echo "$name" | tr [A-Z] [a-z] | sed 's| ||g')" |
286 |
ucr_varname="groups/default/$ucr_varname" |
286 |
ucr_varname="groups/default/$ucr_varname" |
287 |
|
287 |
|
288 |
result="$(ucr get "$ucr_varname")" |
288 |
result="$(/usr/sbin/univention-config-registry get "$ucr_varname")" |
289 |
if [ -n "$result" ]; then |
289 |
if [ -n "$result" ]; then |
290 |
echo -n "$result" |
290 |
echo -n "$result" |
291 |
else |
291 |
else |