Branch: Tag:

2001-03-27

2001-03-27 18:37:40 by Martin Stjernholm <mast@lysator.liu.se>

Fixed a bug causing chgrp/chmod of the whole server tree at every
start when running as a different user. Only chmod to read permissions
to the group in the server tree.

Rev: server/start:1.158

1:   #!/bin/sh   # - # $Id: start,v 1.157 2001/03/24 03:03:19 per Exp $ + # $Id: start,v 1.158 2001/03/27 18:37:40 mast Exp $      ### If --silent-start is given as the first argument,   ### nothing will be printed to stdout by the script.
25:    if [ ! x$ugid = x ] ; then    dp "Doing uid change to $ugid"    oifs="$IFS";IFS=':';set $ugid;IFS="$oifs" -  change_owner $1 $2 $DIR $VARDIR $LOGDIR -  ok=`ls -lgd $a 2>/dev/null | grep $2 |wc -l` +  if [ ! "x$2" = x ]; then +  ok=`ls -lgd . 2>/dev/null | grep $2 |wc -l`    ok=`echo $ok`    if [ "x$ok" = x1 ] ; then -  dp ". is already readable by $2" +  dp "The server directory is already readable by group $2"    else    chgrp -R "$2" . -  chmod -R g+w . +  chmod -R g+r .    fi    fi -  +  change_owner $1 $2 $DIR $VARDIR $LOGDIR    fi -  +  fi   }