Changeset 685

Show
Ignore:
Timestamp:
07/07/08 12:45:15 (2 months ago)
Author:
free
Message:

added dpsyco userskel command

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cdd-utils/trunk/debian/changelog

    r674 r685  
    1 cdd-utils (0.12.6) UNRELEASED; urgency=low 
     1cdd-utils (0.12.7) 64studio; urgency=low 
    22 
    33  * [lib]: 
     
    1212     - system 
    1313        . change grub timeout in /boot/grub/menu.list 
     14        . added dpsyco userskel command 
    1415  * [bin] 
    1516     - qjackctl-wrapper: hide qjack's main window at startup 
  • cdd-utils/trunk/lib/system.sh

    r670 r685  
    258258    echo $hostname > /etc/hostname 
    259259} 
     260 
     261# Description: update system and user skels 
     262# Depends: dpsyco-skel 
     263# 
     264dpsyco () { 
     265 
     266    user=$1 
     267    if nullstr $user; then warning "No username given"; return; fi 
     268 
     269    # Configure dpsyco users 
     270    cfg=/etc/dpsyco/adduser.conf 
     271    if ! exists $cfg; then warning $cfg not found; return; fi 
     272    key="UID_MATCH" 
     273    sep="=" 
     274    val="1000" 
     275    add_key "$key" "$sep" "$cfg" 
     276    set_key "$key" "$sep" "$val" "$cfg" 
     277 
     278    update-dpsyco-users-skel 
     279#        update-dpsyco-skel 
     280 
     281    # Hack to workaround dpsyco's ownership bug 
     282    if grep -q $user /etc/passwd; then 
     283       for i in $(find /usr/share/dpsyco/userskel/ |cut -f 6- -d /); do 
     284          chown $user /home/$user/$i; 
     285       done 
     286    fi 
     287}