Forum Discussion

Demeter_Luo's avatar
Demeter_Luo
Icon for Nimbostratus rankNimbostratus
Nov 30, 2016

Bash script embedded TMSH command can't execute.

Hi All

 

I have a Bash script and embedded TMSH command.

 

I found Find the delete selfip command is not effective.

 

Such as: /usr/bin/tmsh delete /net self 172.16.0.55.

 

The others TMSH command is effective in the script.

 

An error is as follows:

 

"was not found.requested self IP (/Common/172.16.0.55"

 

But don't through script directly copy to console can be effective.

 

Why?

 

Thanks D.Luo

 

1 Reply

  • I've just tried it on my box and it worked:

    [root@default:/S1-green-P:Active:Standalone] config  tmsh list /net self
    net self 192.168.0.1 {
        address 192.168.0.1/30
        traffic-group traffic-group-local-only
        vlan Xover
    }
    net self 172.31.19.231 {
        address 172.31.19.231/23
        allow-service all
        traffic-group traffic-group-local-only
        vlan IN
    }
    
    [root@default:/S1-green-P:Active:Standalone] config  tmsh delete net self 192.168.0.1
    
    [root@default:/S1-green-P:Active:Standalone] config  tmsh list /net self
    net self 172.31.19.231 {
        address 172.31.19.231/23
        allow-service all
        traffic-group traffic-group-local-only
        vlan IN
    }
    

    Can you show output of

    list /net self
    command ?