diff options
author | irina <irinagomez@us.es> | 2014-04-25 09:37:45 +0000 |
---|---|---|
committer | irina <irinagomez@us.es> | 2014-04-25 09:37:45 +0000 |
commit | 332bbb13d893fb3c9b67ec41027d2493e5c41fd6 (patch) | |
tree | 4d6eee027f07fea001c520b3d1be62b0805d0bd8 /admin/Sources/Services/ogAdmRepoAux | |
parent | 97f6020f68eb732c73f9be1472c5138fb26073a6 (diff) |
#565 Compatibilidad con el comando file de Ubuntu 14.04 para obtener correctamente la versión del Kernel del cliente ogLive.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4252 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/Sources/Services/ogAdmRepoAux')
-rwxr-xr-x | admin/Sources/Services/ogAdmRepoAux | 5 |
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 () { |