Bash script for adding routes to configuration files at RHEL, Oracle Linux, Fedora...
#!/bin/bash
ip r s | grep -i eth1 > /etc/sysconfig/network-scripts/route-eth1
ip r s | grep -i eth2 > /etc/sysconfig/network-scripts/route-eth2
ip r s | grep -i eth0 > /etc/sysconfig/network-scripts/route-eth0
ip r s | grep -i eth3 > /etc/sysconfig/network-scripts/route-eth3
ip r s | grep -i eth4 > /etc/sysconfig/network-scripts/route-eth4
# check routes
ls /etc/sysconfig/network-scripts/route*
Žiadne komentáre:
Zverejnenie komentára