2
# DocumentId: $Id: update-dpsyco-users-skel,v 1.19 2001/12/07 15:17:13 ola Exp $
3
# Author: $Author: ola $
4
# Date: $Date: 2001/12/07 15:17:13 $
6
# Updates the dpsyco base users skeleton, and patch if needed.
8
# Read the default dpsyco config.
9
. /etc/dpsyco/defaults.conf
10
. /usr/share/dpsyco/change.func
11
. /usr/share/dpsyco/owner.func
13
TESTNFS="/ $DHOME /etc"
14
. /usr/share/dpsyco/checknfs.test
16
# Users that exist in password file.
17
EUSERS=$(grep "^[^:]*:[^:]*:$UID_MATCH:" $PWDF | sed -e "s|:.*||g;")
21
if [ -f $USERSRC/$U ] ; then
24
if [ -d "$DHOME/$U" ] ; then
25
if [ -d "$USERSKELSRC" ] ; then
26
rsync -rlptD -I "$USERSKELSRC/" /etc/skel
27
dpsyco-skel "$USERSKELSRC/" "$DHOME/$U"
29
changeowner $U $U "$DHOME/$U"
30
if [ ! -z "$EMAIL" ] ; then
31
PROFILE="$DHOME/$U/.bash_profile"
32
if grep "^EMAIL=" /dev/null 2>&1 ; then
33
changefile "s|\(EMAIL=.*\)|export \1|;" $PROFILE
35
if grep "export[[:space:]][[:space:]]*EMAIL=" $PROFILE > /dev/null 2>&1 ; then
36
if ! grep grep "export[[:space:]][[:space:]]*EMAIL='$EMAIL'" $PROFILE > /dev/null 2>&1 ; then
37
changefile "s|export[[:space:]][[:space:]]*EMAIL=.*|export EMAIL='$EMAIL'|;" $PROFILE
40
echo "export EMAIL='$EMAIL'" >> $PROFILE