summaryrefslogtreecommitdiffstats
path: root/admin/Sources/Clients
diff options
context:
space:
mode:
Diffstat (limited to 'admin/Sources/Clients')
-rw-r--r--admin/Sources/Clients/ogAdmClient/sources/ogAdmClient.c9
-rw-r--r--admin/Sources/Clients/ogAdmClient/sources/ogAdmClient.h2
-rw-r--r--admin/Sources/Clients/ogagent/linux/Makefile21
-rw-r--r--admin/Sources/Clients/ogagent/linux/debian/control5
-rwxr-xr-x[-rw-r--r--]admin/Sources/Clients/ogagent/linux/desktop/OGAgentTool.desktop0
-rw-r--r--admin/Sources/Clients/ogagent/linux/ogagent-template.spec6
-rwxr-xr-x[-rw-r--r--]admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool0
-rwxr-xr-x[-rw-r--r--]admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool-startup0
-rwxr-xr-x[-rw-r--r--]admin/Sources/Clients/ogagent/linux/scripts/ogagent0
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/linux/operations.py7
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/operations.py2
-rwxr-xr-xadmin/Sources/Clients/ogagent/windows/py2exe-wine-linux.sh18
12 files changed, 41 insertions, 29 deletions
diff --git a/admin/Sources/Clients/ogAdmClient/sources/ogAdmClient.c b/admin/Sources/Clients/ogAdmClient/sources/ogAdmClient.c
index 9035e81a..6f87cc45 100644
--- a/admin/Sources/Clients/ogAdmClient/sources/ogAdmClient.c
+++ b/admin/Sources/Clients/ogAdmClient/sources/ogAdmClient.c
@@ -2132,6 +2132,12 @@ BOOLEAN ejecutaArchivo(char* filecmd,TRAMA *ptrTrama)
liberaMemoria(buffer);
return(TRUE);
}
+
+BOOLEAN EjecutaComandosPendientes(TRAMA* ptrTrama)
+{
+ return(TRUE);
+}
+
//______________________________________________________________________________________________________
// Función: enviaMensajeServidor
//
@@ -2262,6 +2268,9 @@ int main(int argc, char *argv[])
strcpy(tbfuncionesClient[cf].nf, "InventarioSoftware");
tbfuncionesClient[cf++].fptr = &InventarioSoftware;
+ strcpy(tbfuncionesClient[cf].nf, "EjecutaComandosPendientes");
+ tbfuncionesClient[cf++].fptr = &EjecutaComandosPendientes;
+
/*--------------------------------------------------------------------------------------------------------
Toma dirección IP del cliente
---------------------------------------------------------------------------------------------------------*/
diff --git a/admin/Sources/Clients/ogAdmClient/sources/ogAdmClient.h b/admin/Sources/Clients/ogAdmClient/sources/ogAdmClient.h
index 9539afbf..da0a5c34 100644
--- a/admin/Sources/Clients/ogAdmClient/sources/ogAdmClient.h
+++ b/admin/Sources/Clients/ogAdmClient/sources/ogAdmClient.h
@@ -87,7 +87,7 @@ char* tbErroresScripts[]={"Se han generado errores desconocidos. No se puede con
"030-Error al restaurar imagen - Imagen mas grande que particion",\
"031-Error al realizar el comando updateCache",\
"032-Error al formatear",\
- "033-Error no definido",\
+ "033-Archivo de imagen corrupto o de otra versión de partclone",\
"034-Error no definido",\
"035-Error no definido",\
"036-Error no definido",\
diff --git a/admin/Sources/Clients/ogagent/linux/Makefile b/admin/Sources/Clients/ogagent/linux/Makefile
index 6ada91f5..889f07de 100644
--- a/admin/Sources/Clients/ogagent/linux/Makefile
+++ b/admin/Sources/Clients/ogagent/linux/Makefile
@@ -17,6 +17,7 @@ CACHES := $(shell find $(SOURCEDIR) -name '__pycache__')
clean:
rm -rf $(PYC) $(CACHES) $(DESTDIR)
+
install-ogagent:
rm -rf $(DESTDIR)
mkdir -p $(LIBDIR)
@@ -26,12 +27,11 @@ install-ogagent:
mkdir -p $(CFGDIR)
mkdir -p $(XDGAUTOSTARTDIR)
mkdir -p $(KDEAUTOSTARTDIR)
-
- mkdir $(LIBDIR)/img
-
+ mkdir -p $(LIBDIR)/img
+
# Cleans up .pyc and cache folders
rm -f $(PYC) $(CACHES)
-
+
cp -r $(SOURCEDIR)/opengnsys $(LIBDIR)/opengnsys
cp -r $(SOURCEDIR)/cfg $(LIBDIR)/cfg
cp $(SOURCEDIR)/img/oga.png $(LIBDIR)/img
@@ -40,22 +40,24 @@ install-ogagent:
# QT Dialogs & resources
cp $(SOURCEDIR)/*_ui.py $(LIBDIR)
cp $(SOURCEDIR)/OGAgent_rc.py $(LIBDIR)
-
+ # Version file
+ cp $(SOURCEDIR)/VERSION $(LIBDIR)
+
# Autostart elements for gnome/kde
cp desktop/OGAgentTool.desktop $(XDGAUTOSTARTDIR)
cp desktop/OGAgentTool.desktop $(KDEAUTOSTARTDIR)
-
+
# scripts
cp scripts/ogagent $(BINDIR)
cp scripts/OGAgentTool-startup $(BINDIR)
cp scripts/OGAgentTool $(BINDIR)
-
+
# Fix permissions
chmod 755 $(BINDIR)/ogagent
chmod 755 $(BINDIR)/OGAgentTool-startup
chmod 755 $(LIBDIR)/OGAgentUser.py
chmod 600 $(LIBDIR)/cfg/ogagent.cfg
-
+
# If for red hat based, copy init.d
ifeq ($(DISTRO),rh)
mkdir -p $(INITDIR)
@@ -64,8 +66,7 @@ ifeq ($(DISTRO),rh)
ln -fs /usr/share/OGAgent/cfg/ogagent.cfg $(CFGDIR)
ln -fs /usr/share/OGAgent/cfg/ogclient.cfg $(CFGDIR)
endif
-
- # chmod 0755 $(BINDIR)/ogagent
+
uninstall:
rm -rf $(LIBDIR)
# rm -f $(BINDIR)/ogagent
diff --git a/admin/Sources/Clients/ogagent/linux/debian/control b/admin/Sources/Clients/ogagent/linux/debian/control
index 34d25de7..c627c31b 100644
--- a/admin/Sources/Clients/ogagent/linux/debian/control
+++ b/admin/Sources/Clients/ogagent/linux/debian/control
@@ -4,12 +4,13 @@ Priority: optional
Maintainer: Ramón M. Gómez <ramongomez@us.es>
Build-Depends: debhelper (>= 7), po-debconf
Standards-Version: 3.9.2
-Homepage: https://opengnsys.es
+Homepage: https://opengnsys.es/
Package: ogagent
Section: admin
Priority: optional
Architecture: all
-Depends: policykit-1(>=0.100), python-requests (>=0.8.2), python-qt4 (>=4.9), python-six(>=1.1), python-prctl(>=1.1.1), python (>=2.7), libxss1, ${misc:Depends}
+Depends: policykit-1(>=0.100), python-requests (>=0.8.2), python-qt4 (>=4.9), python-six(>=1.1), python-prctl(>=1.1.1), python-distro, python (>=2.7), libxss1, ${misc:Depends}
+Recommends: gnome-shell-extension-top-icons-plus
Description: OpenGnsys Agent for Operating Systems
This package provides the required components to allow this machine to work on an environment managed by OpenGnsys.
diff --git a/admin/Sources/Clients/ogagent/linux/desktop/OGAgentTool.desktop b/admin/Sources/Clients/ogagent/linux/desktop/OGAgentTool.desktop
index fd3867d3..fd3867d3 100644..100755
--- a/admin/Sources/Clients/ogagent/linux/desktop/OGAgentTool.desktop
+++ b/admin/Sources/Clients/ogagent/linux/desktop/OGAgentTool.desktop
diff --git a/admin/Sources/Clients/ogagent/linux/ogagent-template.spec b/admin/Sources/Clients/ogagent/linux/ogagent-template.spec
index 1368cccb..b3c7362f 100644
--- a/admin/Sources/Clients/ogagent/linux/ogagent-template.spec
+++ b/admin/Sources/Clients/ogagent/linux/ogagent-template.spec
@@ -8,12 +8,12 @@ BuildRoot: %{buildroot}
Name: %{name}
Version: %{version}
Release: %{release}
-Summary: OpenGnsys Agent & tools
+Summary: OpenGnsys Agent for Operating Systems
License: BSD3
Group: Admin
-Requires: python-six python-requests PyQt4 libXScrnSaver
+Requires: chkconfig initscripts python-six python-requests python-distro PyQt4 libXScrnSaver
Vendor: OpenGnsys Project
-URL: https://opengnsys.es
+URL: https://opengnsys.es/
Provides: ogagent
%define _rpmdir ../
diff --git a/admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool b/admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool
index 5b300523..5b300523 100644..100755
--- a/admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool
+++ b/admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool
diff --git a/admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool-startup b/admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool-startup
index bb3a848e..bb3a848e 100644..100755
--- a/admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool-startup
+++ b/admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool-startup
diff --git a/admin/Sources/Clients/ogagent/linux/scripts/ogagent b/admin/Sources/Clients/ogagent/linux/scripts/ogagent
index 1bcc29b0..1bcc29b0 100644..100755
--- a/admin/Sources/Clients/ogagent/linux/scripts/ogagent
+++ b/admin/Sources/Clients/ogagent/linux/scripts/ogagent
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/linux/operations.py b/admin/Sources/Clients/ogagent/src/opengnsys/linux/operations.py
index 0c08f95f..f3236e26 100644
--- a/admin/Sources/Clients/ogagent/src/opengnsys/linux/operations.py
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/linux/operations.py
@@ -42,6 +42,7 @@ import subprocess
import struct
import array
import six
+import distro
from opengnsys import utils
from .renamer import rename
@@ -139,8 +140,10 @@ def getDomainName():
def getLinuxVersion():
- lv = platform.linux_distribution()
- return lv[0] + ', ' + lv[1]
+ """
+ Returns the version of the Linux distribution
+ """
+ return distro.os_release_attr('pretty_name')
def reboot(flags=0):
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/operations.py b/admin/Sources/Clients/ogagent/src/opengnsys/operations.py
index 1a274b20..be777dd5 100644
--- a/admin/Sources/Clients/ogagent/src/opengnsys/operations.py
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/operations.py
@@ -47,4 +47,4 @@ else:
else:
from .linux.operations import * # @UnusedWildImport
os_type = 'Linux'
- os_version = getLinuxVersion().replace(',', '')
+ os_version = getLinuxVersion()
diff --git a/admin/Sources/Clients/ogagent/windows/py2exe-wine-linux.sh b/admin/Sources/Clients/ogagent/windows/py2exe-wine-linux.sh
index 17fbbbc7..407dd155 100755
--- a/admin/Sources/Clients/ogagent/windows/py2exe-wine-linux.sh
+++ b/admin/Sources/Clients/ogagent/windows/py2exe-wine-linux.sh
@@ -14,7 +14,6 @@ download() {
wget -nd https://www.python.org/ftp/python/2.7.14/python-2.7.14.msi -O python-2.7.msi
wget -nd http://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi
wget -nd https://bootstrap.pypa.io/get-pip.py
- wget -nd http://sourceforge.net/projects/pywin32/files/pywin32/Build%20221/pywin32-221.win32-py2.7.exe/download -O pywin32-install.exe
wget -nd http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/py2exe-0.6.9.win32-py2.7.exe/download -O py2exe-install.exe
wget -nd http://prdownloads.sourceforge.net/nsis/nsis-3.0rc1-setup.exe?download -O nsis-install.exe
wget -nd http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.4/PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x32.exe/download -O pyqt-install.exe
@@ -27,32 +26,32 @@ install_python() {
echo "Setting up wine prefix (using winetricks)"
winetricks
fi
-
+
cd downloads
echo "Installing python"
$WINE msiexec /qn /i python-2.7.msi
echo "Installing vc for python"
$WINE msiexec /qn /i VCForPython27.msi
-
- echo "Installing pywin32 (needs X)"
- $WINE pywin32-install.exe
+
echo "Installing py2exe (needs X)"
$WINE py2exe-install.exe
- echo "Installing pyqt"
+ echo "Installing pyqt (needs X)"
$WINE pyqt-install.exe
echo "Installing nsis (needs X?)"
$WINE nsis-install.exe
-
+
cd ..
}
setup_pip() {
echo "Seting up pip..."
$WINE C:\\Python27\\python -m pip install --upgrade pip
-}
+}
install_packages() {
- echo "Installing required packages"
+ echo "Installing pywin32"
+ $WINE C:\\Python27\\python -m pip install pywin32
+ echo "Installing required packages"
$WINE C:\\Python27\\python -m pip install requests
$WINE C:\\Python27\\python -m pip install six
# Using easy_install instead of pip to install pycrypto
@@ -68,4 +67,3 @@ install_python
setup_pip
install_packages
-