From 3c1e13638ed11047cfab0d69a9c4a2838f9c34a1 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 19 May 2014 18:20:23 -0400 Subject: Make /etc/network/ hierarchy. --- diff --git a/build b/build index 3d5cafc..17deddc 100755 --- a/build +++ b/build @@ -60,6 +60,12 @@ install: build install -p -m 0644 ../src.var/www/index.html \ dest/var/www/index.html; \ fi; \ + if config_enabled IFUPDOWN; then \ + install -d -m 0755 dest/etc; \ + for d in '' if-pre-up.d if-up.d if-down.d if-post-down.d; do \ + install -d -m 0755 "dest/etc/network/$${dir}"; \ + done; \ + fi; \ if config_enabled UDHCPC; then \ install -d -m 0755 dest/usr/share/udhcpc; \ install -p -m 0755 ../src.usr/share/udhcpc/default.script \ diff --git a/busybox.pkg/postinst b/busybox.pkg/postinst index d0a2cc3..d74c331 100755 --- a/busybox.pkg/postinst +++ b/busybox.pkg/postinst @@ -5,4 +5,14 @@ if [ "x${1}" = 'xconfigure' ]; then update-alternatives --install "${link}" "${name}" \ "${link}.busybox" "${prio}" done /etc/network/interfaces + printf 'auto lo\niface lo inet loopback\n\n' >&3 + for iface in /sys/class/net/eth*; do + iface="${iface#*/}" + printf 'auto %s\niface %s inet dhcp\n\n' \ + "${iface}" "${iface}" >&3 + done + exec 3>&- + fi fi diff --git a/changelog b/changelog index ec838c5..04aefec 100644 --- a/changelog +++ b/changelog @@ -3,6 +3,8 @@ busybox (1.21.1-4) trunk * /etc/init.d/httpd: Add missing space in start message. * Install /usr/share/udhcpc/default.script to configure the network interface, routes, and nameservers with DHCP. + * Create /etc/network/ directory hierarchy and generate a default + /etc/network/interfaces file to configure the available interfaces. -- "P. J. McDermott" Mon, 19 May 2014 17:25:38 -0400 -- cgit v0.9.1