diff options
author | ramon <ramongomez@us.es> | 2009-10-23 11:54:12 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2009-10-23 11:54:12 +0000 |
commit | 3458879bfb56041bf1ac7ae0b2b058ef97407640 (patch) | |
tree | d0726de381c66d0eefc0c1c59c23244f4f11ab8f /client/engine/System.lib | |
parent | 5a6001315c05c2d5b7388a13d5133fc444b233ce (diff) |
Correcciones en varias funciones; funciĆ³n en pruebas ogGetIpAddress.
git-svn-id: https://opengnsys.es/svn/trunk@406 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/engine/System.lib')
-rwxr-xr-x | client/engine/System.lib | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/client/engine/System.lib b/client/engine/System.lib index b4cd0e42..bc8e02d8 100755 --- a/client/engine/System.lib +++ b/client/engine/System.lib @@ -62,6 +62,15 @@ HOST="$HOSTNAME" echo $HOST } +# ogGetIpAddress +function ogGetIpAddress () { +local IP +IP=$(awk '/fixed-address/ {gsub(/;/,""); host=$2} + END {print host} + ' /var/lib/dhcp3/dhclient.leases) +echo $IP; +} + #/** # ogRaiseError errcode ["errmessage" ...] |