diff options
author | ramon <ramongomez@us.es> | 2013-11-08 13:21:36 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2013-11-08 13:21:36 +0000 |
commit | 89a51662e92b86f1255bac11b844b57bffc2d712 (patch) | |
tree | c9bb6d7baf4c24b84e0a2718e57d586c008ca1aa /client | |
parent | 96726400006306358e9bc19f2011b2512be92d8c (diff) |
541: Disponible inventario básico de software de Mac OS, listando solo aplicaciones pero no sus versiones.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4081 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client')
-rwxr-xr-x | client/engine/Inventory.lib | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/client/engine/Inventory.lib b/client/engine/Inventory.lib index 3f6bd8b0..127caff5 100755 --- a/client/engine/Inventory.lib +++ b/client/engine/Inventory.lib @@ -256,6 +256,9 @@ lshw | awk 'BEGIN {type="mod";} #@version 0.1 - Primeras pruebas con OpenGnSys #@author Ramon Gomez, ETSII Universidad de Sevilla #@date 2009-09-23 +#@version 1.0.5 - Aproximación para inventario de software de Mac OS. +#@author Ramon Gomez, ETSII Universidad de Sevilla +#@date 2013-10-08 #*/ ## function ogListSoftware () { @@ -275,7 +278,7 @@ TYPE=$(ogGetFsType $1 $2) || return $? MNTDIR=$(ogMount $1 $2) || return $? case "$TYPE" in - EXT[234]|REISERFS|REISER4) + EXT[234]|REISERFS|REISER4) # Software de GNU/Linux. # Procesar paquetes dpkg. DPKGDIR="${MNTDIR}/var/lib/dpkg" if [ -r $DPKGDIR ]; then @@ -317,7 +320,7 @@ case "$TYPE" in ls -A $PACMANDIR fi ;; - NTFS|HNTFS|FAT32|HFAT32) + NTFS|HNTFS|FAT32|HFAT32) # Software de Windows. # Claves de registro para programas instalados: formato "{clave}". KEYS=$(ogListRegistryKeys $MNTDIR software '\Microsoft\Windows\CurrentVersion\Uninstall') KEYS32=$(ogListRegistryKeys $MNTDIR software '\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall') @@ -337,6 +340,13 @@ case "$TYPE" in fi done) | sort | uniq ;; + HFS|HFSPLUS) # Software de Mac OS. + # Listar directorios de aplicaciones (falta buscar versiones en ficheros .plist). + find "${MNTDIR}/Applications" -type d -name "*.app" -prune -print | \ + while read k; do + echo "$(basename "$k" .app)" + done | sort + ;; *) ogRaiseError $OG_ERR_PARTITION "$1, $2" return $? ;; esac |