[-]
[+]
|
Changed |
_service:set_version:inventory-system.spec
|
|
[-]
[+]
|
Changed |
_service:recompress:tar_scm:inventory-system-0.0.9550.tar.bz2/client/inventory-system.sh
^
|
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
# Inventory System
# Author: Carsten Schoene
-# $LastChangedDate: 2014-07-11 13:23:27 +0200 (Fri, 11 Jul 2014) $
-# $Rev: 8738 $
+# $LastChangedDate: 2014-11-28 15:44:14 +0100 (Fri, 28 Nov 2014) $
+# $Rev: 9550 $
#
# Default options (can be changed by inventory-system.conf)
DEBUG="yes"
@@ -365,6 +365,9 @@
function get_system_cpu {
[ "`is_disabled $FUNCNAME`" == "1" ] && return
CPU=`${LSHW} -quiet -C processor | ${GREP} "product:" | ${SORT} -u | ${AWK} -F"product: " '{ print $NF}' | ${HEAD} -n1 | ${SED} -e 's@\s\+@ @g'`
+ if [ -n "`echo ${CPU} | ${GREP} -i -E '(O.E.M.|OEM)'`" ] ; then
+ CPU=`${LSHW} -quiet -C processor | ${GREP} "version:" | ${SORT} -u | ${AWK} -F"version: " '{ print $NF}' | ${HEAD} -n1 | ${SED} -e 's@\s\+@ @g'`
+ fi
debug "SYSTEM-CPU: ${CPU}"
echo ${CPU}
}
@@ -399,6 +402,14 @@
;;
kvm)
ROOTDEV=`${READLINK} -f /dev/root`
+ if [ -z "${ROOTDEV}" ] || [ ! -e "${ROOTDEV}" ] ; then
+ if [ -d /dev/disk/by-uuid/ ] ; then
+ UUID=`${GREP} -E '(^UUID=.*\s/\s.*)' /etc/fstab | ${SED} -r 's@^UUID=(.*)\s/\s.*@\1@'`
+ ROOTDEV=`${READLINK} -e $(${LS} -1A /dev/disk/by-uuid/${UUID})`
+ else
+ ROOTDEV=`${GREP} -E '(^/dev/.*\s/\s.*)' /etc/fstab | ${SED} -r 's@^(/dev/x?[hsv]d[a-z].*)\s/\s.*@\1@'`
+ fi
+ fi
if [ "${ROOTDEV}" == "/dev/root" ] ; then
# on kvm /dev/root is not always a symlink - ugly hack
MAJOR=`${DMSETUP} deps /dev/root | ${AWK} -F": " '{print $2}' | ${AWK} -F, '{print $1}' | ${SED} -e 's@(@@'`
@@ -420,6 +431,12 @@
;;
*)
ROOTDEV=`${READLINK} -f /dev/root`
+ if [ -z "${ROOTDEV}" ] || [ ! -e "${ROOTDEV}" ] ; then
+ UUID=`${GREP} -E '(^UUID=.*\s/\s.*)' /etc/fstab | ${SED} -r 's@^UUID=(.*)\s/\s.*@\1@'`
+ ROOTDEV=`${READLINK} -e $(${LS} -1A /dev/disk/by-uuid/${UUID})`
+ else
+ ROOTDEV=`${GREP} -E '(^/dev/.*\s/\s.*)' /etc/fstab | ${SED} -r 's@^(/dev/.*)\s/\s.*@\1@'`
+ fi
# HP
HP_ROOTDISK=`echo ${ROOTDEV} | ${GREP} "/dev/cciss" | ${SED} -r 's@(/dev/cciss/c[0-9]d[0-9]).*@\1@'`
# linux software raid
|
[-]
[+]
|
Changed |
_service:set_version:debian.changelog
^
|
@@ -1,4 +1,4 @@
-inventory-system (0.0.8738) stable; urgency=low
+inventory-system (0.0.9550) stable; urgency=low
* Initial Release
|
[-]
[+]
|
Changed |
_service:set_version:inventory-system.dsc
^
|
@@ -2,7 +2,7 @@
Source: inventory-system
Binary: inventory-system
Architecture: any
-Version: 0.0.8738
+Version: 0.0.9550
Maintainer: Carsten Schoene <cs@linux-administrator.com>
Standards-Version: 0.0.1
Build-Depends: cdbs, cmake, debhelper
|