diff options
author | ramon <ramongomez@us.es> | 2011-10-17 10:07:18 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2011-10-17 10:07:18 +0000 |
commit | 1cd64e65e3eaa0d5cb03c5b13a6a83f90c7bd7bf (patch) | |
tree | df808c871e4467b7210febd432c976e0ccc23d81 /client/engine/Net.lib | |
parent | e4dafd64d9c6df68d0067b8b171af4f5c8b04403 (diff) |
Versión 1.0.2: Continuar depurando el motor de clonación:
* Revisar variables locales.
* Ayudas de las funciones.
* Incluir fecha y hora en mensajes de logs.
Modifica ticket #446.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@2348 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/engine/Net.lib')
-rwxr-xr-x | client/engine/Net.lib | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/client/engine/Net.lib b/client/engine/Net.lib index b10e408e..b7534e20 100755 --- a/client/engine/Net.lib +++ b/client/engine/Net.lib @@ -55,7 +55,7 @@ fi function ogGetGroupName () { if [ "$*" == "help" ]; then - ogHelp "$FUNCNAME" "$FUNCNAME" "$FUNCNAME Grupo1" + ogHelp "$FUNCNAME" "$FUNCNAME" "$FUNCNAME => Grupo1" return fi [ -n "$group" ] && echo "$group" @@ -73,6 +73,10 @@ fi function ogGetHostname () { local HOST +if [ "$*" == "help" ]; then + ogHelp "$FUNCNAME" "$FUNCNAME" "$FUNCNAME => pc1" + return +fi # Tomar nombre de la variable HOSTNAME HOST="$HOSTNAME" # Si no, tomar del DHCP, opción host-name /* (comentario para Doxygen) @@ -98,7 +102,11 @@ HOST="$HOSTNAME" #*/ ## function ogGetNetInterface () { -[ -n "$DEVICE" ] && echo $DEVICE +if [ "$*" == "help" ]; then + ogHelp "$FUNCNAME" "$FUNCNAME" "$FUNCNAME => eth0" + return +fi +[ -n "$DEVICE" ] && echo "$DEVICE" } @@ -120,6 +128,10 @@ function ogGetNetInterface () function ogGetIpAddress () { local IP +if [ "$*" == "help" ]; then + ogHelp "$FUNCNAME" "$FUNCNAME" "$FUNCNAME => 192.168.0.10" + return +fi if [ -n $IPV4ADDR ]; then IP=$IPV4ADDR else @@ -149,6 +161,10 @@ echo ${IP%%/*} # (comentario para Doxygen) */ function ogGetMacAddress () { local MAC +if [ "$*" == "help" ]; then + ogHelp "$FUNCNAME" "$FUNCNAME" "$FUNCNAME => 00:11:22:33:44:55" + return +fi # Obtener direcciones Ethernet. if [ -n "$DEVICE" ]; then MAC=$(ip -o address show up dev "$DEVICE" 2>/dev/null | awk '{sub (/.*\\/, ""); if ($1~/ether/) printf ("%s ", toupper($2));}') @@ -174,6 +190,10 @@ echo ${MAC%% *} #*/ ## function ogGetRepoIp () { +if [ "$*" == "help" ]; then + ogHelp "$FUNCNAME" "$FUNCNAME" "$FUNCNAME => 192.168.0.2" + return +fi # Obtener direcciones IP, segun el protocolo de montaje if [ -n "$OGIMG" ]; then case "$ogprotocol" in @@ -198,6 +218,10 @@ fi #*/ ## function ogGetServerIp () { +if [ "$*" == "help" ]; then + ogHelp "$FUNCNAME" "$FUNCNAME" "$FUNCNAME => 192.168.0.2" + return +fi # Obtener direcciones IP. if [ -n "$OPENGNSYS" ]; then case "$ogprotocol" in |