Difference between revisions of "dbedit scripts"
From cpwiki.net
Line 3: | Line 3: | ||
== create hosts == | == create hosts == | ||
for i in {1..12}; do \ | for i in {1..12}; do \ | ||
+ | |||
echo "create network host_192.168.$i.0-24"; \ | echo "create network host_192.168.$i.0-24"; \ | ||
+ | |||
echo "modify network_objects host_192.168.$i.0-24 ipaddr 192.168.$i.0"; \ | echo "modify network_objects host_192.168.$i.0-24 ipaddr 192.168.$i.0"; \ | ||
+ | |||
echo "update network_objects host_192.168.$i.0-24"; done | echo "update network_objects host_192.168.$i.0-24"; done | ||
Line 11: | Line 14: | ||
for i in {1..12}; do \ | for i in {1..12}; do \ | ||
echo "create network net_192.168.$i.0-24"; \ | echo "create network net_192.168.$i.0-24"; \ | ||
+ | |||
echo "modify network_objects net_192.168.$i.0-24 ipaddr 192.168.$i.0"; \ | echo "modify network_objects net_192.168.$i.0-24 ipaddr 192.168.$i.0"; \ | ||
+ | |||
echo "modify network_objects net_192.168.$i.0-24 netmask 255.255.255.0"; \ | echo "modify network_objects net_192.168.$i.0-24 netmask 255.255.255.0"; \ | ||
+ | |||
echo "update network_objects net_192.168.$i.0-24"; done | echo "update network_objects net_192.168.$i.0-24"; done | ||
[[category:dbedit]] | [[category:dbedit]] |
Latest revision as of 01:33, 26 April 2013
create hosts
for i in {1..12}; do \
echo "create network host_192.168.$i.0-24"; \
echo "modify network_objects host_192.168.$i.0-24 ipaddr 192.168.$i.0"; \
echo "update network_objects host_192.168.$i.0-24"; done
create networks
for i in {1..12}; do \ echo "create network net_192.168.$i.0-24"; \
echo "modify network_objects net_192.168.$i.0-24 ipaddr 192.168.$i.0"; \
echo "modify network_objects net_192.168.$i.0-24 netmask 255.255.255.0"; \
echo "update network_objects net_192.168.$i.0-24"; done