source: client/shared/scripts/generateMenuDefault @ 6903f32

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since 6903f32 was 31c148d8, checked in by ramon <ramongomez@…>, 13 years ago

Versión 1.0.4, #495: Eliminar mensajes de error al generar el menú de arranque por defecto del cliente e incluir códigos de colores para parámetros de red.

git-svn-id: https://opengnsys.es/svn/branches/version1.0@3140 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100755
File size: 1.4 KB
Line 
1#ª/bin/bash
2
3source /tmp/net-eth0.conf
4FILEINFOHTML=$OGLOG/`ogGetIpAddress`.info.html
5FILEINFOCACHE=$OGLOG/`ogGetIpAddress`.cache.txt
6ogMountCache 2>/dev/null
7CACHECONTENIDO=`ls -m $OGCAC/$OGIMG 2>/dev/null`
8
9SPEED=$(LANG=C ethtool $DEVICE 2>/dev/null | awk '$1~/Speed/ {print $2}')
10case "$SPEED" in
11        1000[Mm]b/s)    ;;
12        100[Mm]b/s)     SPEED="<font color=\"blue\">$SPEED</font>" ;;
13        10[Mm]b/s)      SPEED="<font color=\"grey\">$SPEED</font>" ;;
14        *)              SPEED="<font color=\"red\">$SPEED</font>" ;;
15esac
16DUPLEX=$(LANG=C ethtool $DEVICE 2>/dev/null | awk '$1~/Duplex/ {print $2}')
17case "$DUPLEX" in
18        [Ff]ull)        ;;
19        *)              DUPLEX="<font color=\"red\">$DUPLEX</font>"
20esac
21CACHESIZEFREE=$(ogGetFreeSize `ogFindCache`)
22expr $CACHESIZEFREE / 1024 > $FILEINFOCACHE 2>/dev/null && echo '.MB,' >> $FILEINFOCACHE
23
24#
25#  echo '';
26#
27
28cat > $FILEINFOHTML << EOF
29<div align="center" style="font-family: Arial, Helvetica, sans-serif;">
30<p style="color:#999999; font-size: 16px; margin: 2em;">
31
32<table border=1 width="100%">
33<tr>
34<td rowspan="2"><p align="left"><img border="0" src="../images/iconos/logoopengnsys.png"><p> </td>
35<td> Hostname </td> <td> IP </td> <td> MAC </td> <td> Speed </td> <td> Duplex </td> </tr>
36<tr> <td>$HOSTNAME </td> <td> $(ogGetIpAddress) </td> <td> $(ogGetMacAddress) </td> <td> $SPEED </td> <td> $DUPLEX </td> </tr>
37</table>
38
39</p>
40<p style="font-size: 14px; margin: 2em;">
41</p>
42</div>
43
44EOF
45cat >> $FILEINFOCACHE << EOF
46$CACHECONTENIDO
47EOF
48
Note: See TracBrowser for help on using the repository browser.