Univention Bugzilla – Attachment 5825 Details for
Bug 29241
UCR should be called with an absolute path
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated patch for 3.2-1
020_fix-ucr-invoke.patch (text/plain), 6.79 KB, created by
Moritz Muehlenhoff
on 2014-03-11 12:40:49 CET
(
hide
)
Description:
Updated patch for 3.2-1
Filename:
MIME Type:
Creator:
Moritz Muehlenhoff
Created:
2014-03-11 12:40:49 CET
Size:
6.79 KB
patch
obsolete
>If univention-lib is used as a user (as in UCC), the binary needs to be executed with the absolute path >(since /usr/sbin is not in the default PATH). > >Bug #29241 > >diff -Naur univention-lib-3.0.26.orig//shell/base.sh univention-lib-3.0.26/shell/base.sh >--- univention-lib-3.0.26.orig//shell/base.sh 2014-01-09 18:27:10.000000000 +0100 >+++ univention-lib-3.0.26/shell/base.sh 2014-03-11 12:30:56.170098230 +0100 >@@ -64,7 +64,7 @@ > local namejoinscript > namejoinscript="$1" > shift >- local role="$(ucr get server/role)" >+ local role="$(/usr/sbin/univention-config-registry get server/role)" > if [ "$role" = "domaincontroller_master" -o "$role" = "domaincontroller_backup" ] ; then > echo "Calling joinscript $namejoinscript ..." > "$joinscript" "$@" >@@ -124,7 +124,7 @@ > > if [ -x "$joinscript" ] ; then > shift >- local role="$(ucr get server/role)" >+ local role="$(/usr/sbin/univention-config-registry get server/role)" > if [ "$role" = "domaincontroller_master" -o "$role" = "domaincontroller_backup" ] ; then > "$joinscript" "$@" && delete_unjoinscript "${joinscript_name}" > fi >@@ -142,7 +142,7 @@ > joinscript="/usr/lib/univention-install/$1" > if [ -x "$joinscript" ] ; then > shift >- if [ "$(ucr get server/role)" = "domaincontroller_master" ] ; then >+ if [ "$(/usr/sbin/univention-config-registry get server/role)" = "domaincontroller_master" ] ; then > "$joinscript" "$@" > fi > fi >@@ -169,7 +169,7 @@ > # fi > # > is_domain_controller () { >- case "$(ucr get server/role)" in >+ case "$(/usr/sbin/univention-config-registry get server/role)" in > domaincontroller_master) return 0 ;; > domaincontroller_backup) return 0 ;; > domaincontroller_slave) return 0 ;; >@@ -230,8 +230,8 @@ > # create passwort > # > create_machine_password () { >- local length="$(ucr get machine/password/length)" >- local compl="$(ucr get machine/password/complexity)" >+ local length="$(/usr/sbin/univention-config-registry get machine/password/length)" >+ local compl="$(/usr/sbin/univention-config-registry get machine/password/complexity)" > > if [ -z "$length" ]; then > length=20 >@@ -266,7 +266,7 @@ > ucr_varname="$(echo "$name" | tr [A-Z] [a-z] | sed 's| ||g')" > ucr_varname="users/default/$ucr_varname" > >- result="$(ucr get "$ucr_varname")" >+ result="$(/usr/sbin/univention-config-registry get "$ucr_varname")" > if [ -n "$result" ]; then > echo -n "$result" > else >@@ -285,7 +285,7 @@ > ucr_varname="$(echo "$name" | tr [A-Z] [a-z] | sed 's| ||g')" > ucr_varname="groups/default/$ucr_varname" > >- result="$(ucr get "$ucr_varname")" >+ result="$(/usr/sbin/univention-config-registry get "$ucr_varname")" > if [ -n "$result" ]; then > echo -n "$result" > else >diff -Naur univention-lib-3.0.26.orig//shell/ldap.sh univention-lib-3.0.26/shell/ldap.sh >--- univention-lib-3.0.26.orig//shell/ldap.sh 2014-01-23 18:25:59.000000000 +0100 >+++ univention-lib-3.0.26/shell/ldap.sh 2014-03-11 12:32:23.052126034 +0100 >@@ -142,7 +142,7 @@ > echo "ucs_addServiceToLocalhost: wrong argument number" >&2 > return 2 > fi >- eval "$(ucr shell server/role ldap/hostdn)" >+ eval "$(/usr/sbin/univention-config-registry shell server/role ldap/hostdn)" > ucs_addServiceToHost "$servicename" "$server_role" "$ldap_hostdn" "$@" > } > >@@ -157,7 +157,7 @@ > local servicename="$1" > local modulename="$2" > local hostdn="$3" >- local ldap_base="$(ucr get ldap/base)" >+ local ldap_base="$(/usr/sbin/univention-config-registry get ldap/base)" > if ! shift 3 > then > echo "ucs_addServiceToHost: wrong argument number" >&2 >@@ -187,7 +187,7 @@ > echo "ucs_removeServiceFromLocalhost: wrong argument number" >&2 > return 2 > fi >- eval "$(ucr shell server/role ldap/hostdn)" >+ eval "$(/usr/sbin/univention-config-registry shell server/role ldap/hostdn)" > ucs_removeServiceFromHost "$servicename" "$server_role" "$ldap_hostdn" "$@" > } > >@@ -202,7 +202,7 @@ > local servicename="$1" > local modulename="$2" > local hostdn="$3" >- local ldap_base="$(ucr get ldap/base)" >+ local ldap_base="$(/usr/sbin/univention-config-registry get ldap/base)" > if ! shift 3 > then > echo "ucs_removeServiceFromHost: wrong argument number" >&2 >@@ -256,8 +256,8 @@ > # > ucs_isServiceUnused () { # <servicename> > local servicename="$1" >- local master="$(ucr get ldap/master)" >- local port="$(ucr get ldap/master/port)" >+ local master="$(/usr/sbin/univention-config-registry get ldap/master)" >+ local port="$(/usr/sbin/univention-config-registry get ldap/master/port)" > > if ! shift 1 > then >@@ -328,7 +328,7 @@ > if [ -n "$package_name" ]; then > package_version=$(dpkg-query -f '${Version}' -W "$package_name") > else >- eval "$(ucr shell '^tests/ucs_registerLDAP/.*')" >+ eval "$(/usr/sbin/univention-config-registry shell '^tests/ucs_registerLDAP/.*')" > if [ -n "$tests_ucs_registerLDAP_packagename" ] && [ -n "$tests_ucs_registerLDAP_packageversion" ]; then > package_name="$tests_ucs_registerLDAP_packagename" > package_version="$tests_ucs_registerLDAP_packageversion" >@@ -385,7 +385,7 @@ > > cp "$schemaFile" /var/lib/univention-ldap/local-schema/ > >- ucr commit /etc/ldap/slapd.conf >+ /usr/sbin/univention-config-registry commit /etc/ldap/slapd.conf > > test -x /etc/init.d/slapd && /etc/init.d/slapd crestart > } >diff -Naur univention-lib-3.0.26.orig//shell/ucr.sh univention-lib-3.0.26/shell/ucr.sh >--- univention-lib-3.0.26.orig//shell/ucr.sh 2013-06-26 14:51:21.000000000 +0200 >+++ univention-lib-3.0.26/shell/ucr.sh 2014-03-11 12:34:25.995676240 +0100 >@@ -29,7 +29,7 @@ > > is_ucr_true () { # test if UCR variable is "true" or "false" > local value >- value="$(univention-config-registry get "$1")" >+ value="$(/usr/sbin/univention-config-registry get "$1")" > case "$(echo -n "$value" | tr [:upper:] [:lower:])" in > 1|yes|on|true|enable|enabled) return 0 ;; > 0|no|off|false|disable|disabled) return 1 ;; >@@ -81,7 +81,7 @@ > > if [ -e /etc/univention/templates/info/"$1" ] ; then > # unregister info file before moving >- univention-config-registry unregister "$(basename "$1" .info)" >+ /usr/sbin/univention-config-registry unregister "$(basename "$1" .info)" > mv /etc/univention/templates/info/"$1" "/etc/univention/templates/removed/$(basename "$1").$(date +%Y%m%d_%H%M%S_%N)" > fi > } >diff -Naur univention-lib-3.0.26.orig//shell/umc.sh univention-lib-3.0.26/shell/umc.sh >--- univention-lib-3.0.26.orig//shell/umc.sh 2013-12-10 10:53:37.000000000 +0100 >+++ univention-lib-3.0.26/shell/umc.sh 2014-03-11 12:33:09.000967844 +0100 >@@ -32,7 +32,7 @@ > # <http://www.gnu.org/licenses/>. > > >-eval "$(ucr shell ldap/base)" >+eval "$(/usr/sbin/univention-config-registry shell ldap/base)" > > BIND_ARGS="$@" > >@@ -56,7 +56,7 @@ > > umc_init () { > >- eval "$(ucr shell groups/default/domainadmins groups/default/domainusers)" >+ eval "$(/usr/sbin/univention-config-registry shell groups/default/domainadmins groups/default/domainusers)" > > # containers > udm container/cn create $BIND_ARGS --ignore_exists --position cn=univention,$ldap_base --set name=UMC || exit $?
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 29241
:
4795
|
5001
| 5825