summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2014-05-30 12:40:09 +0000
committerramon <ramongomez@us.es>2014-05-30 12:40:09 +0000
commit786fc3adab5fec059baef6e70cedf97c5773bb01 (patch)
treed8ae0efbf675ffdedbf934221390123e2c028ad5 /client
parent83442e00621d5c0f01e2a2b5df8ecd3d2452eb1b (diff)
#541: Función {{{ogFindCache}}} recoge todas las particiones caché en discos GPT (aunque solo devuelve la primera).
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4293 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client')
-rwxr-xr-xclient/engine/Cache.lib3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/engine/Cache.lib b/client/engine/Cache.lib
index e6bfb6fa..ce1fc38b 100755
--- a/client/engine/Cache.lib
+++ b/client/engine/Cache.lib
@@ -188,7 +188,8 @@ PART=${PART:-$(sfdisk -l 2>/dev/null | awk '$6~/ca|a7/ {print $1}')}
# Por último revisar todos los discos GPT y obtener las particiones etiquetadas como caché.
if [ -z "$PART" ]; then
for DISK in $(ogDiskToDev); do
- PART="$(sgdisk -p $DISK 2>/dev/null | awk -v d=$DISK '$7~/CACHE/ {printf "%s%s",d,$1;}') "
+ # Nota: se añade espacio separador solo si existe valor previo.
+ PART="${PART:+"$PART "}$(sgdisk -p $DISK 2>/dev/null | awk -v d=$DISK '$7~/CACHE/ {printf "%s%s",d,$1;}')"
done
fi