diff options
author | Ramón M. Gómez <ramongomez@us.es> | 2021-07-06 11:55:45 +0200 |
---|---|---|
committer | Ramón M. Gómez <ramongomez@us.es> | 2021-07-06 11:57:42 +0200 |
commit | 142d1c8a095c1b45f556850c21214ac6e4bb7971 (patch) | |
tree | 7ce1cbb98f757be2faacb911371c71d8bd033f92 /client/engine/Inventory.lib | |
parent | 87b8c4698846f84e4bc283efc7ec49243ce8a904 (diff) |
#1048: Avoid Awk 5.x warning when escaping quotes.
Diffstat (limited to 'client/engine/Inventory.lib')
-rwxr-xr-x | client/engine/Inventory.lib | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client/engine/Inventory.lib b/client/engine/Inventory.lib index a905f1bd..a7a52564 100755 --- a/client/engine/Inventory.lib +++ b/client/engine/Inventory.lib @@ -408,11 +408,11 @@ MNTDIR=$(ogMount $1 $2) || return $? # Para GNU/Linux: leer descripción. TYPE="Linux" FILE="$MNTDIR/etc/os-release" -[ -r $FILE ] && VERSION="$(awk -F= '$1~/PRETTY_NAME/ {gsub(/\"/,"",$2); print $2}' $FILE)" +[ -r $FILE ] && VERSION="$(awk -F= '$1~/PRETTY_NAME/ {gsub(/"/,"",$2); print $2}' $FILE)" # Si no se puede obtener, buscar en ficheros del sistema. if [ -z "$VERSION" ]; then FILE="$MNTDIR/etc/lsb-release" - [ -r $FILE ] && VERSION="$(awk -F= '$1~/DESCRIPTION/ {gsub(/\"/,"",$2); print $2}' $FILE)" + [ -r $FILE ] && VERSION="$(awk -F= '$1~/DESCRIPTION/ {gsub(/"/,"",$2); print $2}' $FILE)" for DISTRIB in redhat SuSE mandrake gentoo; do FILE="$MNTDIR/etc/${DISTRIB}-release" [ -r $FILE ] && VERSION="$(head -1 $FILE)" |