Tiny Core Linux
General TC => Programming & Scripting - Unofficial => Topic started by: Lee on December 04, 2013, 04:32:56 PM
-
There was some discussion a while ago ( http://forum.tinycorelinux.net/index.php/topic,7385.msg39174.html#msg39174 ) regarding a console mode (text) equivalent of the control panel's network tool. I decided to sit down and actually write such a tool recently and the result seems workable.
The attached script is modeled pretty closely after what the network applet seems to do ( in Tiny Core version 4.7.7 ), though I didn't actually get into the source code of network.
This has not been extensively tested, so don't count on it working correctly until you've tried it a few times.
Please let me know if you find it useful or if you find bugs in it, and feel free to beat me up if I've done something really dumb.
Edit: 2013-12-05 00:06 (US eastern time): replaced defective attachment.
-
$ sudo nct
Interface? (enter=eth0) --> "I hit ENTER"
Use DHCP? (enter=N) --> "I hit ENTER"
IP address? (enter=192.168.0.32) --> "I 'enter' 192.168.0.3"
/home/tc/.local/bin/nct: line 223:QU$: not found
/home/tc/.local/bin/nct: line 223:QU$: not found
/home/tc/.local/bin/nct: line 223:QU$: not found
Bad address. Try again.
?
-
Sorry about that... that would be the "something dumb" I mentioned earlier. I had posted my original post from an MS Windows box and no doubt corrupted the script in the process.
Obi-Wan: “Wait a minute. How did this happen? We’re smarter than this.”
Anakin: “Apparently not.”
I've re-posted the attachment from a real computer (and downloaded it and tested it).
Sorry for the blunder.