Diff for /buildman/install between versions 1.2 and 1.12

version 1.2, 2025/01/21 20:01:34 version 1.12, 2025/03/12 02:31:46
Line 18 Line 18
   
 PROGN=`basename $0`  PROGN=`basename $0`
   
 if [ $EUID -ne 0 ]  #if [ "$UID" != "0" ]
 then  #then
     echo "$PROGN error:  must run as root"  #    echo "$PROGN error:  must run as root"
     exit 1  #    exit 1
 fi  #fi
   
 TARGET="client"  TARGET="client"
 TUSER="build:6000"  TUSER="build:6000"
Line 47  fi Line 47  fi
 tmphost=`echo ${THOST} | cut -d. -f1`  tmphost=`echo ${THOST} | cut -d. -f1`
 THOST="${tmphost}"  THOST="${tmphost}"
   
 if [ "$OS" == "SunOS" ]  if [ "$OS" = "SunOS" ]
 then  then
     BUILDMAN_BASE="/export/home/build"      BUILDMAN_BASE="/export/home/build"
 else      else    
     BUILDMAN_BASE="/home/build"      BUILDMAN_BASE="/home/build"
 fi  fi
   
 while getopts ':t:u:g:b:m:i:' OPTION  while getopts ':t:u:g:b:m:i:h' OPTION
 do  do
     case $OPTION in      case $OPTION in
   
Line 76  do Line 76  do
   
         m)          m)
             BUILDMAN_MASTER="${OPTARG}"              BUILDMAN_MASTER="${OPTARG}"
               ;;
   
           h)
               echo ""
               echo "BuildMan Installer"
               echo " Copyright (C) 2025 Coherent Logic Development LLC"
               echo ""
               echo ""
               echo "usage:  ${PROGN} [-i <install-base>] [-b <buildman-base>] [-u <buildman-username:buildman-uid>] [-g <buildman-groupname:buildman-gid> ] [-m <buildman-master>"
               echo "  <install-base> is the directory in which buildman will be installed"
               echo "  <buildman-base> is the directory in which buildman will operate"
               echo "  <buildman-username> is the username owning the files for buildman"
               echo "  <buildman-uid> is the numeric UID of the owner of the buildman files"
               echo "  <buildman-groupname> is the group name owning the files for buildman"
               echo "  <buildman-gid> is the numeric GID of the group owning the buildman files"
               echo "  <buildman-master> is the primary buildman host, supplied as IP address or FQDN"
               echo ""
               exit 0
               ;;
     esac      esac
 done  done
   
Line 85  T_UID=`echo ${TUSER} | cut -d: -f2` Line 103  T_UID=`echo ${TUSER} | cut -d: -f2`
 T_GRPNAM=`echo ${TGROUP} | cut -d: -f1`  T_GRPNAM=`echo ${TGROUP} | cut -d: -f1`
 T_GID=`echo ${TGROUP} | cut -d: -f2`  T_GID=`echo ${TGROUP} | cut -d: -f2`
   
   BIN_BASE="${INSTALL_BASE}/bin"
   
   if [ ! -d "${BIN_BASE}" ]
   then
       mkdir -p "${BIN_BASE}"
   fi
   
 groupadd -g ${T_GID} ${T_GRPNAM}  groupadd -g ${T_GID} ${T_GRPNAM}
 useradd -u ${T_UID} -g ${T_GRPNAM} -c "BuildMan" -m -d "${BUILDMAN_BASE}" "${T_LOGIN}"  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 755 bm "${BIN_BASE}/bm"
 install -o ${T_UID} -g ${T_GID} -m 750 bma "${INSTALL_BASE}/sbin/bma"  install -o ${T_UID} -g ${T_GID} -m 755 bma "${BIN_BASE}/bma"
   
 DEF="/etc/default/bm"  DEF="/etc/default/bm"
   
   
 echo "BUILDMAN_BASE=${BUILDMAN_BASE}" > "${DEF}"  echo "BUILDMAN_BASE=${BUILDMAN_BASE}" > "${DEF}"
   echo "BUILDMAN_USER=${T_LOGIN}" >> "${DEF}"
   echo "BUILDMAN_GROUP=${T_GRPNAM}" >> "${DEF}"
 echo "BUILDMAN_UID=${T_UID}" >> "${DEF}"  echo "BUILDMAN_UID=${T_UID}" >> "${DEF}"
 echo "BUILDMAN_GID=${T_GID}" >> "${DEF}"  echo "BUILDMAN_GID=${T_GID}" >> "${DEF}"
 echo "BUILDMAN_MASTER=${BUILDMAN_MASTER}" >> "${DEF}"  echo "BUILDMAN_MASTER=${BUILDMAN_MASTER}" >> "${DEF}"

Removed from v.1.2  
changed lines
  Added in v.1.12


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