Diff for /buildman/install between versions 1.1 and 1.4

version 1.1, 2025/01/21 17:36:51 version 1.4, 2025/01/21 20:52:51
Line 18 Line 18
   
 PROGN=`basename $0`  PROGN=`basename $0`
   
 if [ $EUID -ne 0 ]  if [ $UID -ne 0 ]
 then  then
     echo "$PROGN error:  must run as root"      echo "$PROGN error:  must run as root"
     exit 1      exit 1
Line 27  fi Line 27  fi
 TARGET="client"  TARGET="client"
 TUSER="build:6000"  TUSER="build:6000"
 TGROUP="build:6000"  TGROUP="build:6000"
 BUILDMAN_BASE="/home/build"  
 BUILDMAN_MASTER=""  BUILDMAN_MASTER=""
   INSTALL_BASE="/usr/local"
   
 while getopts ':t:u:g:b:m:' OPTION  OS=`uname`
   
   if [ "$OS" = "SCO_SV" ] ; then
       THOST=`hostname -s`
       PATH=/usr/gnu/bin:$PATH
       export PATH
   else
       if [ "$OS" = "SunOS" ] ; then
           THOST=`hostname`
       else    
           THOST=`hostname -s`
       fi
   fi
   
   tmphost=`echo ${THOST} | cut -d. -f1`
   THOST="${tmphost}"
   
   if [ "$OS" = "SunOS" ]
   then
       BUILDMAN_BASE="/export/home/build"
   else    
       BUILDMAN_BASE="/home/build"
   fi
   
   while getopts ':t:u:g:b:m:i:' OPTION
 do  do
     case $OPTION in      case $OPTION in
   
           i)
               INSTALL_BASE="${OPTARG}"
               ;;
           
           u)
               TUSER="${OPTARG}"
               ;;
   
           g)
               TGROUP="${OPTARG}"
               ;;
                   
           b)
               BUILDMAN_BASE="${OPTARG}"
               ;;
   
           m)
               BUILDMAN_MASTER="${OPTARG}"
   
     esac      esac
 done  done
   
   T_LOGIN=`echo ${TUSER} | cut -d: -f1`
   T_UID=`echo ${TUSER} | cut -d: -f2`
   T_GRPNAM=`echo ${TGROUP} | cut -d: -f1`
   T_GID=`echo ${TGROUP} | cut -d: -f2`
   
   
   groupadd -g ${T_GID} ${T_GRPNAM}
   useradd -u ${T_UID} -g ${T_GRPNAM} -c "BuildMan" -m -d "${BUILDMAN_BASE}" "${T_LOGIN}"
   
   install -o ${T_UID} -g ${T_GID} -m 750 bm "${INSTALL_BASE}/sbin/bm"
   install -o ${T_UID} -g ${T_GID} -m 750 bma "${INSTALL_BASE}/sbin/bma"
   
   DEF="/etc/default/bm"
   
   
   echo "BUILDMAN_BASE=${BUILDMAN_BASE}" > "${DEF}"
   echo "BUILDMAN_UID=${T_UID}" >> "${DEF}"
   echo "BUILDMAN_GID=${T_GID}" >> "${DEF}"
   echo "BUILDMAN_MASTER=${BUILDMAN_MASTER}" >> "${DEF}"
   

Removed from v.1.1  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>