Bug 33506 - ucs-school-lib/base.sh school_dn() → is_ucr_true: command not found
ucs-school-lib/base.sh school_dn() → is_ucr_true: command not found
Product: UCS@school
Classification: Unclassified
Component: Ucsschool-lib
UCS@school 3.1 R2
Other Linux
: P5 minor (vote)
: UCS@school 3.2 R2
Assigned To: Sönke Schwardt-Krummrich
Florian Best
Depends on:
  Show dependency treegraph
Reported: 2013-11-21 14:14 CET by Florian Best
Modified: 2014-06-12 09:20 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Cleanup
Max CVSS v3 score:


Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2013-11-21 14:14:19 CET
root@master:~# . /usr/share/ucs-school-lib/base.sh
root@master:~# school_dn
-bash: is_ucr_true: Kommando nicht gefunden.
-bash: is_ucr_true: command not found

missing import
Comment 1 Florian Best univentionstaff 2013-12-09 17:36:19 CET
The function also doesn't work on a singlemaster.
Comment 2 Alexander Kläser univentionstaff 2013-12-12 14:19:06 CET
Does this currently lead to any known problem?
Comment 3 Florian Best univentionstaff 2013-12-12 14:22:41 CET
(In reply to Alexander Kläser from comment #2)
> Does this currently lead to any known problem?
No, I just could not use it when I wanted to. I copied a working definition from another package then.
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2013-12-12 16:02:22 CET
At first the missing import should be fixed. Please also add a comment that the function returns only valid results on a DC slave.
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2014-04-03 12:41:04 CEST
The functions school_ou and school_dn used a lot of global variables. Additionally school_dn was broken and never returned a correct value.

Both functions have been replaced with simplier versions using grep/sed.
Both functions use ldap/hostdn for determination of OU name and OU DN. Optionally a hostdn may be passed as first argument which is used instead of ldap/hostdn.

Inline documentation has been added to both functions that also contain a note, that these functions will not work on a DC master/DC backup.

Changelog entry has been made.

ucs-school-lib 5.0.1-1 has been imported and rebuild.
Comment 6 Florian Best univentionstaff 2014-04-11 12:07:53 CEST
school_ou 'ou=bar,dc=example,dc=com'
→ does not work

school_dn 'ou=bar,dc=example,dc=com'
→ does not work

The docstrings are very nice!
Comment 7 Sönke Schwardt-Krummrich univentionstaff 2014-04-11 12:26:53 CEST
(In reply to Florian Best from comment #6)
> school_ou 'ou=bar,dc=example,dc=com'
> → does not work
> school_dn 'ou=bar,dc=example,dc=com'
> → does not work

As mentioned in the doc strings a hostdn has to be passed to the two functions.
But you are right, it would be better if a OU DN is also supported.

ucs-school-lib (5.0.2-1)
Comment 8 Florian Best univentionstaff 2014-04-11 13:07:36 CEST
Ok, works fine.
Comment 9 Florian Best univentionstaff 2014-04-11 13:44:27 CEST
Changelog OK
Comment 10 Sönke Schwardt-Krummrich univentionstaff 2014-06-12 09:19:22 CEST
UCS@school 3.2 R2 has been released:

If this error occurs again, please use "Clone This Bug".