Ignore:
Timestamp:
12/03/08 23:07:49 (3 years ago)
Author:
tschmitt
Message:
  • paedml40-upgrade: diverse Anpassungen bzgl. paedML Linux 4.0.2
  • postinst:
    • db.conf Update für Schulkonsole nochmal modifiziert
    • php5-Konfiguration wird angepasst (s.u.)
    • /etc/mindi/mindi.conf wird kopiert, falls nicht vorhanden (s.u.)
  • linuxmuster-setup:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/linuxmuster-base/trunk/var/config-dynamic/15_ldap/prepatch

    r156 r406  
    1 # start postgresql 
    2 /etc/init.d/postgresql-8.1 start 
     1# recreate pg clusters on first install 
     2if [ "$1" = "--first" ]; then 
     3    for i in 7.4 8.1; do 
     4        pg_dropcluster $i main 
     5        pg_createcluster $i main 
     6        cp -f $STATICTPLDIR/etc/postgresql/$i/main/* /etc/postgresql/$i/main 
     7        /etc/init.d/postgresql-$i start 
     8    done 
     9else 
     10    /etc/init.d/postgresql-8.1 start 
     11fi 
    312 
    413 
     
    105114        addgroup openldap ssl-cert 
    106115 
    107         # create new database 
    108         sophomorix-setup-pgldap --new-database 
     116        # create new ldap database 
     117        new_soph_version=`dpkg -l sophomorix-pgldap | grep 'sophomorix-pg' | { read status name version desc; echo "$version";}` 
     118        old_soph_version="0.0.0-0" 
     119        sophomorix-setup-pgldap --oldversion "$old_soph_version" --newversion "$new_soph_version" --new-database 
    109120 
    110         # random password for ldap db user 
     121        # new random password for ldap db user 
    111122        ldapdbpw=`pwgen -s 8 1` 
     123 
     124        # set ldap db password for schulkonsole 
    112125        psql -U postgres -d template1 -qc "ALTER USER ldap WITH PASSWORD '"$ldapdbpw"';" 
    113         sed -e "s/^Password=.*/Password=$ldapdbpw/" -i /etc/linuxmuster/schulkonsole/db.conf 
     126        sed -e "s|^Password=.*|Password=$ldapdbpw|" -i /etc/linuxmuster/schulkonsole/db.conf 
     127 
     128        # deactivate postgres 7.4 
     129        /etc/init.d/postgresql-7.4 stop 
     130        update-rc.d -f postgresql-7.4 remove 
    114131 
    115132else 
    116133 
    117134        # update user database with basedn and workgroup if necessary 
    118         [ "$update_ldap" = "yes" ] && sophomorix-setup-pgldap 
     135        if [ "$update_ldap" = "yes" ]; then 
     136                ldapdbpw=`grep ^Password /etc/linuxmuster/schulkonsole/db.conf | awk -F\= '{ print $2 }'` 
     137                sophomorix-setup-pgldap --slapd-standalone --dbpw "$ldapdbpw" --keep-database 
     138        fi 
    119139 
    120140fi 
Note: See TracChangeset for help on using the changeset viewer.