Bug 27510 - UCR sollte auch bei Multifiles etc/univention/templates/scripts/PATH_TO_FILE ausführen
UCR sollte auch bei Multifiles etc/univention/templates/scripts/PATH_TO_FILE ...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UCR
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 3.0-2
Assigned To: Felix Botner
Andreas Büsching
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-07 16:32 CEST by Felix Botner
Modified: 2012-07-20 15:25 CEST (History)
1 user (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):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2012-06-07 16:32:33 CEST
If a script /etc/univention/templates/scripts/$full_path_to_file exists, 
       it will be called after the file has been created from  the  template.   
       The  script  is  called  with  the  argument  postinst  and  receives  
       the  list  of changes as key@%@old_value@%@new_value on standard input.

Das sollte auch für MultiFiles gelten.
Comment 1 Felix Botner univentionstaff 2012-06-07 16:50:17 CEST
in python/univention/config_registry.py angepasst.
Comment 2 Andreas Büsching univentionstaff 2012-06-21 16:37:44 CEST
Funktioniert:

root@master:/etc/univention/templates/scripts# cat etc/ldap/slapd.conf
#!/bin/bash

echo "Hit me with $@" > /tmp/ucr-scripts.log
echo "STDIN" >>/tmp/ucr-scripts.log
while read line; do
        echo $line >>/tmp/ucr-scripts.log
done

root@master:/etc/univention/templates/scripts# ucr set ldap/sizelimit="400002" 
Setting ldap/sizelimit
Multifile: /etc/ldap/slapd.conf

root@master:/etc/univention/templates/scripts# cat /tmp/ucr-scripts.log
Hit me with postinst
STDIN
ldap/sizelimit@%@400000@%@400002


ChangeLog-Eintrag existiert auch
Comment 3 Stefan Gohmann univentionstaff 2012-07-20 15:25:34 CEST
UCS 3.0-2 has been released: 
  http://forum.univention.de/viewtopic.php?f=54&t=1905

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