Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Script:
- #!/bin/bash
- filename = 'wifi-settings.txt';
- pathname = '/home/ndavis/myfiles/';
- echo "$pathname$filename";
- touch "$pathname$filename";
- # copy the config files into a holding file
- {
- echo "Contents of the DHCP config file /etc/dhcp3/dhcpd.conf"; echo ' ';
- cat /etc/dhcp3/dhcpd.conf;
- echo ' '; echo "Contents of the NetWork config file /etc/network/interfaces"; echo ' ';
- cat /etc/network/interfaces;
- echo ' '; echo "Contents of the DHCP resolv file /etc/dhcpc/resolv.conf"; echo ' ';
- cat /etc/dhcpc/resolv.conf;
- echo ' '; echo "Contents of the Net Mgr file /etc/NetworkManager/nm-system-settings.conf"; echo ' ';
- cat /etc/NetworkManager/nm-system-settings.conf;
- echo ' '; echo "Contents of the NM Auto eth0 file /etc/NetworkManager/system-connections/Auto eth0"; echo ' ';
- cat '/etc/NetworkManager/system-connections/Auto eth0';
- # capture the ip settings
- echo ' '; echo "Snap shot of the network settings from ifconfig"; echo ' ';
- ifconfig;
- echo ' ';
- }
- > "$pathname$filename"
- Errors:
- Only 2 errors now.
- touch: cannot touch `': No such file or directory
- /home/ndavis/myfiles/Scripts/set-wifi.sh: line 26: : No such file or directory
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement