Advertisement
TBotNik

Untitled

Jul 25th, 2011
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. Script:
  2.  
  3. #!/bin/bash
  4.  
  5. filename = 'wifi-settings.txt';
  6. pathname = '/home/ndavis/myfiles/';
  7. echo "$pathname$filename";
  8. touch "$pathname$filename";
  9.  
  10. # copy the config files into a holding file
  11. {
  12. echo "Contents of the DHCP config file /etc/dhcp3/dhcpd.conf"; echo ' ';
  13. cat /etc/dhcp3/dhcpd.conf;
  14. echo ' '; echo "Contents of the NetWork config file /etc/network/interfaces"; echo ' ';
  15. cat /etc/network/interfaces;
  16. echo ' '; echo "Contents of the DHCP resolv file /etc/dhcpc/resolv.conf"; echo ' ';
  17. cat /etc/dhcpc/resolv.conf;
  18. echo ' '; echo "Contents of the Net Mgr file /etc/NetworkManager/nm-system-settings.conf"; echo ' ';
  19. cat /etc/NetworkManager/nm-system-settings.conf;
  20. echo ' '; echo "Contents of the NM Auto eth0 file /etc/NetworkManager/system-connections/Auto eth0"; echo ' ';
  21. cat '/etc/NetworkManager/system-connections/Auto eth0';
  22.  
  23. # capture the ip settings
  24. echo ' '; echo "Snap shot of the network settings from ifconfig"; echo ' ';
  25. ifconfig;
  26. echo ' ';
  27. }
  28. > "$pathname$filename"
  29.  
  30. Errors:
  31.  
  32. Only 2 errors now.
  33.  
  34. touch: cannot touch `': No such file or directory
  35. /home/ndavis/myfiles/Scripts/set-wifi.sh: line 26: : No such file or directory
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement