#718: Revisar documentación y proceso de intalación de OGAgent; actualizar comandos de OGAgent para macOS.

git-svn-id: https://opengnsys.es/svn/branches/version1.1@5240 a21b9725-9963-47de-94b9-378ad31fedc9
oglive
ramon 2017-03-21 10:23:58 +00:00
parent 804c389b8f
commit 75ba20c026
5 changed files with 27 additions and 34 deletions

View File

@ -6,8 +6,8 @@ Requisitos de creación
----------------------
Sisitema operativo Linux con los siguientes paquetes instalados:
- Subversion
- Python, librerías PyQt4
- Wine (32 bits), Wine Gecko, Wine Mono, Samba Winbind, Cabextrct
- GNU C++, Python, librerías PyQt4
- Creación de instalador Exe (Wine 32 bits, Wine Gecko, Wine Mono, Samba Winbind, Cabextrct)
- Creación de paquetes Deb (debhelper, dpkg-dev)
- Creación de paquetes RPM (rpm-build)
- Creación de paquetes Pkg (xar, bomutils)
@ -16,26 +16,18 @@ Sisitema operativo Linux con los siguientes paquetes instalados:
Crear instaladores de OGAgent
-----------------------------
- Paso previo: actaulizar componentes gráficos de PyQt para OGAgnet:
cd src
./update.sh
cd ..
src/update.sh
- Crear paquetes Deb y RPM para distribuciones Linux (requiere permisos de "root"):
cd linux
sudo ./build-packages.sh
cd ..
sudo linux/build-packages.sh
- Crear paquete Pkg para sistemas operativos macOS X:
sudo macos/build-pkg.sh
- Crear el programa instalador para sistemas operativos Windows:
cd windows
./build-windows.sh
cd ..
windows/build-windows.sh
- Crear paquete Pkg para sistemas operativos macOS:
cd macos
./build-pkg.sh
cd ..
- Subir los nuevos ficheros .deb, .rpm y .exe generados en el directorio
- Subir los nuevos ficheros .deb, .rpm, .pkg y .exe generados al directorio
/opt/opengnsys/www/descargas del servidor OpenGnsys.
@ -79,8 +71,8 @@ Instalar OGAgent en cliente modelo
- Instalar dependencias:
sudo easy_install pip
sudo pip install netifaces requests six
- Puede ser necesario activar descargas desde cualquier sitio en Menú /
Preferencias del sistema / Seguridad y privacidad / Pestaña General.
- Descargar e instalar el agente:
sudo installer -pkg OGAgentInstaller-Version.pkg -target /
- Descargar el paquete y usar Finder pulsando sobre el fichero para instalarlo.
- Configurar el agente:
sed -i "0,/remote=/ s,remote=.*,remote=https://IPServidorOpenGnsys/opengnsys/rest/," /Applications/OGAgent.app/cfg/ogagent.cfg
@ -92,6 +84,6 @@ Postconfiguración para clientes clonados
----------------------------------------
- Ejecutar manualmente o configurar automáticamente OGAgent en los clientes clonados
en el script de postconfiguración tras restuarar imagen:
ogConfigureOsAgent NDisco Npart
ogConfigureOgagent NDisco Npart

View File

@ -3,6 +3,7 @@
VERSION=1.1.0
RELEASE=1
cd $(dirname "$0")
top=`pwd`
# Debian based

View File

@ -5,14 +5,13 @@ SRCDIR=$(dirname "$0")
BINDIR=/usr/bin
INITDIR=/Library/LaunchDaemons
# Dependencies:
#easy_install pip
#pip install netifaces requests six
# Check if it needs to install Python dependencies:
if ! which pip &>/dev/null; then
easy_install pip
pip install netifaces requests six
fi
# Copy files.
# Copying files.
cp $SRCDIR/ogagent $BINDIR
cp $SRCDIR/es.opengnsys.ogagent.plist $INITDIR
# Show post-installation message.
#osascript -e 'display notification "You must install following Python modules: netifaces, requests, six." with title "OGAgent Installer'

View File

@ -118,27 +118,28 @@ def getMacosVersion():
def reboot(flags=0):
'''
Simple reboot using AppleScript
Simple reboot command
'''
# Workaround for dummy thread
if six.PY3 is False:
import threading
threading._DummyThread._Thread__stop = lambda x: 42
# Exec reboot using AppleScript.
subprocess.call('/usr/bin/osascript -e \'tell app "System Events" to restart\'', shell=True)
# Exec reboot command
subprocess.call('/sbin/shutdown -r now', shell=True)
def poweroff(flags=0):
'''
Simple poweroff using AppleScript
Simple poweroff command
'''
# Workaround for dummy thread
if six.PY3 is False:
import threading
threading._DummyThread._Thread__stop = lambda x: 42
# Exec shutdown using AppleScript.
subprocess.call('/usr/bin/osascript -e \'tell app "System Events" to shut down\'', shell=True)
# Exec shutdown command
subprocess.call('/sbin/shutdown -h now', shell=True)
def logoff():
@ -154,7 +155,6 @@ def logoff():
subprocess.call('/usr/bin/osascript -e \'tell app "System Events" to «event aevtrlgo»\'', shell=True)
def renameComputer(newName):
rename(newName)

View File

@ -32,6 +32,7 @@ function process {
pyuic4 message-dialog.ui -o message_dialog_ui.py -x
}
cd $(dirname "$0")
pyrcc4 -py3 OGAgent.qrc -o OGAgent_rc.py