summaryrefslogtreecommitdiffstats
path: root/busybox.pkg/postinst
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-05-19 18:20:23 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-05-19 18:20:23 (EDT)
commit3c1e13638ed11047cfab0d69a9c4a2838f9c34a1 (patch)
treec3ff66a5537f03f00492866cc42d1e83f537450d /busybox.pkg/postinst
parent143dfc9f3fd6ff5932a5bec4718f2a0eca438aaf (diff)
Make /etc/network/ hierarchy.
Diffstat (limited to 'busybox.pkg/postinst')
-rwxr-xr-xbusybox.pkg/postinst10
1 files changed, 10 insertions, 0 deletions
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 </usr/share/busybox/alternatives
+ if [ -d /etc/network ] && ! [ -f /etc/network/interfaces ]; then
+ exec 3>/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