918-git-images-111dconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacion
opengnsys-1.1.1b
Rev | Line | |
---|
[831830f] | 1 | #!/bin/bash |
---|
| 2 | # Script para solicitar acciones al servidor de administración desde los clientes. |
---|
| 3 | # Acciones permitidas: configurar modo de arranque. |
---|
| 4 | PARM=`cat` |
---|
| 5 | |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | BASEDIR=/opt/opengnsys |
---|
| 9 | PATH=$PATH:$BASEDIR/bin |
---|
| 10 | SERVERNAME=ogAdmServer |
---|
| 11 | SERVERLOG=$BASEDIR/log/$SERVERNAME.log |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | # Añade registro de incidencias. |
---|
| 15 | function echolog () { |
---|
| 16 | date +"%Y%m%d-%H%M%S $*" >> $SERVERLOG |
---|
| 17 | } |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | PARM1=$(echo $PARM | cut -f1 -d" ") |
---|
| 21 | PARM2=$(echo $PARM | cut -f2 -d" ") |
---|
| 22 | PARM3=$(echo $PARM | cut -f3 -d" ") |
---|
| 23 | PARM4=$(echo $PARM | cut -f4 -d" ") |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | case "$PARM1" in |
---|
| 27 | SET_CLIENTMODE) |
---|
| 28 | #1 SET_CLIENTMODE |
---|
| 29 | #2 template |
---|
| 30 | #3 pc_name o group_pc |
---|
[ccbb493] | 31 | #4 modo temporal o permanente |
---|
| 32 | |
---|
[831830f] | 33 | TEMPLATE="$PARM2" |
---|
| 34 | PC="$PARM3" |
---|
[ccbb493] | 35 | #incluyo parametro de MODO |
---|
| 36 | MODO="$PARM4" |
---|
[831830f] | 37 | echolog "Ejecutar $(which setclientmode) $FILE $MCASTOPT" |
---|
[ccbb493] | 38 | #incluyo parametro de MODO |
---|
| 39 | setclientmode $TEMPLATE $PC $MODO &>> $SERVERLOG |
---|
[831830f] | 40 | exit $? |
---|
| 41 | ;; |
---|
| 42 | default) |
---|
| 43 | echolog "Solicitud con parametros \"$PARM\" no realizada, no registrada o con errores" |
---|
| 44 | ;; |
---|
| 45 | esac |
---|
| 46 | |
---|
Note: See
TracBrowser
for help on using the repository browser.