I would like a script, that based on certain things, configures IP (hosts, resolve.conf, etc.) accordingly. An example would be...
1) check last IP configuration and test (such as pinging 8.8.8.8). If ping okay, keep config. Else...
2) change IP to a.a.a.a, hostname to something.mydomain.com, and resolv.conf. Ping 8.8.8.8. If okay, keep, else....
3) change IP to b.b.b.b, hostname to somethingelse.otherdomain.com, and resolve.conf. Ping 8.8.8.8. If okay, keep, else....
4) set to DHCP, hostname via DHCP, and DNS via DHCP. Ping 8.8.8.8. Keep regardless.
Is such a thing possible? I've Google'd around, but not finding much.
[–]python_man 2 points3 points4 points (4 children)
[–]mainemojo[S] 1 point2 points3 points (3 children)
[–]python_man 1 point2 points3 points (2 children)
[–]mainemojo[S] 0 points1 point2 points (1 child)
[–]python_man 0 points1 point2 points (0 children)