WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: network config script  (Read 2953 times)

Offline Lee

  • Hero Member
  • *****
  • Posts: 645
    • My Core wiki user page
network config script
« 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.
« Last Edit: December 05, 2013, 12:07:51 AM by Lee »
32 bit core4.7.7, Xprogs, Xorg-7.6, wbar, jwm  |  - Testing -
PPR, data persistence through filetool.sh          |  32 bit core 8.0 alpha 1
USB Flash drive, one partition, ext2, grub4dos  | Otherwise similar

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: network config script
« Reply #1 on: December 04, 2013, 07:28:39 PM »
$ sudo nct
Code: [Select]
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.
?
« Last Edit: December 04, 2013, 07:33:21 PM by Misalf »
Download a copy and keep it handy: Core book ;)

Offline Lee

  • Hero Member
  • *****
  • Posts: 645
    • My Core wiki user page
Re: network config script
« Reply #2 on: December 05, 2013, 12:17:51 AM »
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.

Quote
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.
32 bit core4.7.7, Xprogs, Xorg-7.6, wbar, jwm  |  - Testing -
PPR, data persistence through filetool.sh          |  32 bit core 8.0 alpha 1
USB Flash drive, one partition, ext2, grub4dos  | Otherwise similar