summaryrefslogtreecommitdiffstats
path: root/admin/Sources/Services/ogAdmRepoAux
diff options
context:
space:
mode:
Diffstat (limited to 'admin/Sources/Services/ogAdmRepoAux')
-rwxr-xr-xadmin/Sources/Services/ogAdmRepoAux5
1 files changed, 3 insertions, 2 deletions
diff --git a/admin/Sources/Services/ogAdmRepoAux b/admin/Sources/Services/ogAdmRepoAux
index 7d21b241..01dac195 100755
--- a/admin/Sources/Services/ogAdmRepoAux
+++ b/admin/Sources/Services/ogAdmRepoAux
@@ -25,8 +25,9 @@ REPODIR="$BASEDIR/images/"
# BACKUP: Define si se realiza copia de seguridad al crear una imagen (true|false).
eval $(grep BACKUP $BASEDIR/client/etc/engine.cfg)
# FS segun kernel. ext4 para < 3.7, para >= BTRFS
-KERNEL=$(file $BASEDIR/tftpboot/ogclient/ogvmlinuz |awk -F . '{print $2}')
-[ $KERNEL -lt 7 ] && IMGFS="EXT4" || IMGFS="BTRFS"
+KERNEL=$(file -bkr /opt/opengnsys/tftpboot/ogclient/ogvmlinuz |awk '/Linux/ {for(i=1;i<=NF;i++) if($i~/version/) {v=$(i+1);printf("%d",v);sub(/[0-9]*\./,"",v);printf(".%02d",v)}}')
+[ $KERNEL \< 3.7 ] && IMGFS="EXT4" || IMGFS="BTRFS"
+
# AƱade registro de incidencias.
function echolog () {