You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Alex Williams 6b6a7b2c92
Fix README.md
3 years ago
.gitignore Change the hostname if the value is set 5 years ago
CHANGELOG.md Only wipe /etc/resolv.conf if a domain or dns entry exists 3 years ago
LICENSE Flush routes _before_ adding the IP 3 years ago
LICENSE-GPL Add udhcpc.script.orig and GPL license 5 years ago
README.md Fix README.md 3 years ago
module.l Flush routes _before_ adding the IP 3 years ago
network.sh Flush routes _before_ adding the IP 3 years ago
network_dhcp.sh Restore 'sleep' while waiting for network interface. Ensure pid file is always removed 3 years ago
network_static.sh Restore 'sleep' while waiting for network interface. Ensure pid file is always removed 3 years ago
udhcpc.script Only wipe /etc/resolv.conf if a domain or dns entry exists 3 years ago
udhcpc.script.orig Add udhcpc.script.orig and GPL license 5 years ago

README.md

TinyCore static/dhcp networking

GitHub release

A simple set of shell scripts for managing networking on TinyCore Linux

tinycore-network

Installation

tce-load -wi network

Note: This extension is architecture independent, but hasn't been officially added to TinyCore yet. I've included the packaged extension in the releases Downloads.

Configuration

The configuration file is located at /usr/local/etc/network.conf. It's a simple key/value file similar to this:

dhcp (IPv4 only)

mode=dhcp
interface=eth0
hostname=mybox
ntpserver=pool.ntp.org

static IPv4

mode=static
interface=eth0
ip=192.0.2.2
subnet=255.255.255.0
router=192.0.2.1
dns="8.8.8.8 8.8.4.4"
hostname=mybox4
ntpserver=pool.ntp.org

static IPv6

mode=static
interface=eth0
ip="2001:db8::2"
subnet_ipv6="/32"
router="2001:db8::1"
dns="2001:4860:4860::8888 2001:4860:4860::8844"
hostname=mybox6
ntpserver=pool.ntp.org

Notes about IPv6:

  • IPv6 support requires the ip command from iproute2 extension: tce-load -wi iproute2
  • IPv6 subnet length is defined through subnet_ipv6
  • DHCPv6 is not managed by these scripts, see Dibbler
  • Privacy Extensions are not managed by these scripts

Manual installation

To install these scripts manually:

  • Copy network.sh, network_dhcp.sh, network_static.sh, and udhcpc.script to /opt/
  • Create and edit the config at /usr/local/etc/network.conf
  • Add '/opt/network.sh' to /opt/bootsync.sh
  • Add the scripts and config file to /opt/.filetool.lst for persistence

How it works

The network.sh script reads values from network.conf, sets them as temporary environment variables and passes them to either network_static.sh or network_dhcp.sh. Those scripts will use udhcpc to release or renew a DHCP lease.

Changelog

See the Changelog.

License

This project is MIT licensed, see the LICENSE file for more info.

The following files are licensed under GPL-V2:

  • udhcpc.script
  • udhcpc.script.orig