diff options
Diffstat (limited to 'server/bin')
-rwxr-xr-x | server/bin/setclientmode | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/bin/setclientmode b/server/bin/setclientmode index 02c47464..65d7fe69 100755 --- a/server/bin/setclientmode +++ b/server/bin/setclientmode @@ -40,7 +40,7 @@ source $1 || exit 1 [ "$*" == "help" ] && help [ "$*" == "version" ] && version # Comprobar si el usuario es "root" o el del servicio web. -WEBUSER=$(ps axho user,comm|awk '!/root/ && /httpd|apache/ {print $TEMPLATE_NAME; exit;}') +WEBUSER=$(ps axho user,comm|awk '!/root/ && /httpd|apache/ {print $1; exit;}') CALLER=$(getcaller) [ "$USER" != "root" -a "$USER" != "$WEBUSER" -a "$CALLER" != "ogserver" ] && raiseError access "Need to be root (or webserver user)" TEMPLATE[0]="${PXEDIR[0]}/templates/${MODE_FILE}" @@ -78,10 +78,10 @@ for MAC in $ETHERNET; do DATOS=$(echo ${DATOS// /} | tr 'áéíóúñçÁÉÍÓÚÑÇ' 'aeiouncAEIOUNC') [[ "$DATOS" =~ (vga|video) ]] || DATOS="$DATOS vga=788" # Obtener directorio ogLive a partir de los datos. - OGLIVEDIR=$(echo "$DATOS" | awk -F= 'BEGIN {RS=" "} $TEMPLATE_NAME=="oglivedir" {print $2}') + OGLIVEDIR=$(echo "$DATOS" | awk -F= 'BEGIN {RS=" "} $1=="oglivedir" {print $2}') # Pondremos como propietario al usuario y grupo de Apache para que se pueda cambiar desde la consola web. - WEBGROUP=$(ps axho group,comm|awk '!/root/ && /httpd|apache/ {print $TEMPLATE_NAME; exit;}') + WEBGROUP=$(ps axho group,comm|awk '!/root/ && /httpd|apache/ {print $1; exit;}') for BOOTTYPE in 0 1; do # Si no existe la plantilla borramos el archivo PXE anterior continuamos if [ -z "${TEMPLATE[$BOOTTYPE]}" ]; then |