xen-drbd
diff od.py @ 24:ccf4137ea2a6
print instead of exec
author | igor |
---|---|
date | Tue Feb 19 18:27:29 2008 +0200 (2008-02-19) |
parents | 2ecda36e8d0d |
children | 5e499179b5ed |
line diff
1.1 --- a/od.py Sun Feb 17 13:32:01 2008 +0200 1.2 +++ b/od.py Tue Feb 19 18:27:29 2008 +0200 1.3 @@ -1,7 +1,11 @@ 1.4 1.5 node1='debian' 1.6 node2='mirror' 1.7 -i_am=node1 1.8 +#i_am=node1 1.9 + 1.10 +from socket import gethostname; i_am=gethostname() 1.11 +if i_am != node1 and i_am != node2: 1.12 + raise ValueError, "My hostname (%s) should be equal to node1 (%s) or node2 (%s)" % (i_am, node1, node2) 1.13 1.14 ip_address = { 1.15 node1: '10.0.5.220',