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
Rev | Line | |
---|
[3ba65df] | 1 | #ª/bin/bash |
---|
| 2 | |
---|
| 3 | source /tmp/net-eth0.conf |
---|
| 4 | FILEINFOHTML=/opt/opengnsys/log/`ogGetIpAddress`.info.html |
---|
[1873b9a] | 5 | FILEINFOCACHE=/opt/opengnsys/log/`ogGetIpAddress`.cache.txt |
---|
| 6 | ogMountCache |
---|
| 7 | CACHECONTENIDO=`ls -m /opt/opengnsys/cache/opt/opengnsys/images` |
---|
[3ba65df] | 8 | |
---|
| 9 | SPEED=$(ethtool $DEVICE | grep Speed | awk -F": " '{print $2}') |
---|
| 10 | DUPLEX=$(ethtool $DEVICE | grep Duplex | awk -F": " '{print $2}') |
---|
[1873b9a] | 11 | CACHESIZEFREE=$(ogGetFreeSize `ogFindCache`) |
---|
| 12 | expr $CACHESIZEFREE / 1024 > /opt/opengnsys/log/`ogGetIpAddress`.cache.txt && echo '.MB,' >> /opt/opengnsys/log/`ogGetIpAddress`.cache.txt |
---|
[3ba65df] | 13 | |
---|
| 14 | # |
---|
| 15 | # echo ''; |
---|
| 16 | # |
---|
| 17 | |
---|
| 18 | cat > $FILEINFOHTML << EOF |
---|
[1873b9a] | 19 | <div align="center" style="font-family: Arial, Helvetica, sans-serif;"> |
---|
[3ba65df] | 20 | <p style="color:#999999; font-size: 16px; margin: 2em;"> |
---|
| 21 | |
---|
[1873b9a] | 22 | <table border=1 width="100%"> |
---|
| 23 | <tr> |
---|
[3ba65df] | 24 | <TD rowspan=2><P align=left><IMG border=0 src="../images/iconos/logoopengnsys.png"><P> </td> |
---|
| 25 | <td> Hostname: </td> <td> IP </td> <td> MAC </td> <td> Speed </td> <td> duplex </td> </tr> |
---|
[1873b9a] | 26 | <tr> <td>$HOSTNAME </td> <td> $(ogGetIpAddress) </td> <td> $(ogGetMacAddress) </td> <td> $SPEED </td> <td> $DUPLEX </td> </tr> |
---|
[3ba65df] | 27 | </table> |
---|
| 28 | |
---|
| 29 | </p> |
---|
| 30 | <p style="font-size: 14px; margin: 2em;"> |
---|
| 31 | </p> |
---|
| 32 | </div> |
---|
| 33 | |
---|
[1873b9a] | 34 | EOF |
---|
| 35 | cat >> $FILEINFOCACHE << EOF |
---|
| 36 | $CACHECONTENIDO |
---|
| 37 | EOF |
---|
Note: See
TracBrowser
for help on using the repository browser.