diff options
Diffstat (limited to 'client')
-rwxr-xr-x | client/boot-tools/boottoolsfunctions.lib | 9 | ||||
-rw-r--r-- | client/boot-tools/includes/etc/initramfs-tools/scripts/VERSION.txt | 2 | ||||
-rw-r--r-- | client/boot-tools/includes/usr/bin/boot-tools/listpackages/sw.basic | 3 | ||||
-rwxr-xr-x | client/shared/etc/init/default.sh | 27 | ||||
-rwxr-xr-x | client/shared/scripts/poweroff | 8 | ||||
-rwxr-xr-x | client/shared/scripts/reboot | 9 |
6 files changed, 32 insertions, 26 deletions
diff --git a/client/boot-tools/boottoolsfunctions.lib b/client/boot-tools/boottoolsfunctions.lib index f364f174..7f7bbb38 100755 --- a/client/boot-tools/boottoolsfunctions.lib +++ b/client/boot-tools/boottoolsfunctions.lib @@ -116,13 +116,20 @@ case "${1,,}" in OSARCH="amd64" OSHTTP="http://es.archive.ubuntu.com/ubuntu/" ;; - bionic) # ogLive 1.1.1-rc1 basado en Ubuntu 18.04 y Kernel 4.15. + bionic|bionic-4.15) # ogLive 1.1.1-rc1 basado en Ubuntu 18.04 y Kernel 4.15. OSDISTRIB="ubuntu" OSCODENAME="bionic" OSRELEASE="4.15.0-32-generic" OSARCH="amd64" OSHTTP="http://es.archive.ubuntu.com/ubuntu/" ;; + bionic-4.18) # ogLive 1.1.1-rc3 basado en Ubuntu 18.04 y Kernel 4.18. + OSDISTRIB="ubuntu" + OSCODENAME="bionic" + OSRELEASE="4.18.0-17-generic" + OSARCH="amd64" + OSHTTP="http://es.archive.ubuntu.com/ubuntu/" + ;; host) # ogLive basado en la distribuciĆ³n del servidor. OSDISTRIB=$(lsb_release -is) OSCODENAME=$(lsb_release -cs) diff --git a/client/boot-tools/includes/etc/initramfs-tools/scripts/VERSION.txt b/client/boot-tools/includes/etc/initramfs-tools/scripts/VERSION.txt index 45805bd6..bc92b96f 100644 --- a/client/boot-tools/includes/etc/initramfs-tools/scripts/VERSION.txt +++ b/client/boot-tools/includes/etc/initramfs-tools/scripts/VERSION.txt @@ -1 +1 @@ -OpenGnsys Client 1.1.1-rc2 +OpenGnsys Client 1.1.1-rc3 diff --git a/client/boot-tools/includes/usr/bin/boot-tools/listpackages/sw.basic b/client/boot-tools/includes/usr/bin/boot-tools/listpackages/sw.basic index afd8ff4c..31f2b559 100644 --- a/client/boot-tools/includes/usr/bin/boot-tools/listpackages/sw.basic +++ b/client/boot-tools/includes/usr/bin/boot-tools/listpackages/sw.basic @@ -9,7 +9,8 @@ install console-data install locales install lshw install gawk -install subversion +#install subversion # ogLive anterior a Ubuntu 18.04 +install git # ogLive a partir de Ubuntu 18.04 install python-openssl install python #install php5-cli # ogLive anterior a Ubuntu 16.04 diff --git a/client/shared/etc/init/default.sh b/client/shared/etc/init/default.sh index efc1e035..2fc3ede9 100755 --- a/client/shared/etc/init/default.sh +++ b/client/shared/etc/init/default.sh @@ -3,30 +3,32 @@ # Fichero de registro de incidencias (en el servidor; si no, en local). OPENGNSYS=${OPENGNSYS:-/opt/opengnsys} -OGLOGFILE=${OGLOGFILE:-$OPENGNSYS/log/$(ogGetIpAddress).log} +OGLOGFILE=${OGLOGFILE:-$OPENGNSYS/log/$(ogGetIpAdderss).log} if ! touch $OGLOGFILE 2>/dev/null; then OGLOGFILE=/var/log/opengnsys.log fi LOGLEVEL=5 -# TODO - PRUEBA -AGENT_FILE="/var/tmp/ogAdmClient" -touch $AGENT_FILE -chmod a+wxs $AGENT_FILE -chown root:root $AGENT_FILE -# Exportar funciones para comunicacion con el servidor -sendConfigToServer -sendStatusToServer "initializing" - # Matando plymount para inicir browser o shell pkill -9 plymouthd -# Arranque de OpenGnsys Client daemon (socket). +# Cargar idioma. echo "${MSG_LAUNCHCLIENT:-.}" # Indicar fichero de teclado de Qt para el idioma especificado (tipo "es.qmap"). [ -f /usr/local/etc/${LANG%_*}.qmap ] && export QWS_KEYBOARD="TTY:keymap=/usr/local/etc/${LANG%_*}.qmap" -if [ -x "$OPENGNSYS/bin/ogAdmClient" -a "$ogstatus" != "offline" ]; then +source /scripts/client.cfg +VERSION="1.1.1" # TEMPORAL +if [ -f "$OPENGNSYS/images/ogagent-oglive_${VERSION}_all.deb" -a "$ogstatus" != "offline" ]; then + # Instalar, configurar e iniciar agente. + dpkg -i "$OPENGNSYS/images/ogagent-oglive_${VERSION}_all.deb" + sed -i -e "s,remote=.*,remote=https://$(ogGetServerIp)/opengnsys3/backend/web/app_dev.php/," \ + -e "s,client=.*,client=$CLIENTID," \ + -e "s,secret=.*,secret=$CLIENTSECRET," \ + /usr/share/OGAgent/cfg/ogagent.cfg + ogagent start + sleep 10 +elif [ -x "$OPENGNSYS/bin/ogAdmClient" -a "$ogstatus" != "offline" ]; then # Ejecutar servicio cliente. $OPENGNSYS/bin/ogAdmClient -f $OPENGNSYS/etc/ogAdmClient.cfg -l $OGLOGFILE -d $LOGLEVEL else @@ -42,3 +44,4 @@ if [ "$ogactiveadmin" == "true" ]; then bash fi + diff --git a/client/shared/scripts/poweroff b/client/shared/scripts/poweroff index 7297cad3..563845b3 100755 --- a/client/shared/scripts/poweroff +++ b/client/shared/scripts/poweroff @@ -30,12 +30,10 @@ ethtool -s $DEVICE wol g 2>/dev/null BUSYBOX=$(which busyboxOLD) BUSYBOX=${BUSYBOX:-"busybox"} -# Retardo para dar lugar al registro en cola de acciones. -sleep 5 -# Parar Browser para evitar "cuelgues". -[ "$ogstatus" == "offline" ] || pkill browser +# Parar agente y Browser. +ogagent stop &>/dev/null +pkill -9 browser -sendStatusToServer "off" # Apagar. $BUSYBOX poweroff diff --git a/client/shared/scripts/reboot b/client/shared/scripts/reboot index 5e6305af..30362cc7 100755 --- a/client/shared/scripts/reboot +++ b/client/shared/scripts/reboot @@ -44,12 +44,9 @@ ethtool -s $DEVICE wol g 2>/dev/null BUSYBOX=$(which busyboxOLD) BUSYBOX=${BUSYBOX:-"busybox"} -# Retardo para dar lugar al registro en cola de acciones. -sleep $TIME -# Parar Browser para evitar "cuelgues". -[ "$ogstatus" == "offline" ] || pkill browser - -sendStatusToServer "off" +# Parar agente y Browser. +ogagent stop &>/dev/null +pkill -9 browser # Reiniciar. $BUSYBOX reboot |