--- buildman/install 2025/01/21 20:01:34 1.2 +++ buildman/install 2025/01/21 21:17:08 1.7 @@ -18,11 +18,11 @@ PROGN=`basename $0` -if [ $EUID -ne 0 ] -then - echo "$PROGN error: must run as root" - exit 1 -fi +#if [ "$UID" != "0" ] +#then +# echo "$PROGN error: must run as root" +# exit 1 +#fi TARGET="client" TUSER="build:6000" @@ -47,7 +47,7 @@ fi tmphost=`echo ${THOST} | cut -d. -f1` THOST="${tmphost}" -if [ "$OS" == "SunOS" ] +if [ "$OS" = "SunOS" ] then BUILDMAN_BASE="/export/home/build" else @@ -76,7 +76,8 @@ do m) BUILDMAN_MASTER="${OPTARG}" - + ;; + esac done @@ -89,11 +90,12 @@ 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" +install -u ${T_UID} -g ${T_GID} -m 750 bm "${INSTALL_BASE}/sbin/bm" +install -u ${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}"