ok
I did write the code myself(with some quirks)
If its of any help then here it is!!!!
Code:
#!/usr/bin/ruby
class Etherstub
def initialize
@estub ; @stub_name
@vni
end
def ether_create
puts "enter the no of stubs you want"
@estub = gets ;puts "Enter the names 1 by 1 "
@estub.to_i.each do
|@stub_name| ;@stub_name = gets
end
@estub.to_i.times { puts `/usr/sbin/dladm create-etherstub #{@stub_name}
` }
print "Stub created!!"
end
end
first = Etherstub.new
first.ether_create
The error am getting is that am able to create only one etherstub at a time!
even with the loop!
Finally for you question reagarding shell script or ruby!!
This is choosen to be written in ruby because this will be a wrapper that will use the underlying commands and there are a few more reasons.....
Anyway i will try my luck in the programming forum!!!
Thanks