diff options
-rwxr-xr-x | busybox.pkg/postinst | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/busybox.pkg/postinst b/busybox.pkg/postinst index 0b44e2c..fa5e152 100755 --- a/busybox.pkg/postinst +++ b/busybox.pkg/postinst @@ -5,6 +5,16 @@ 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 if ! [ -f /etc/rc.policy ]; then if [ "x$(cat /etc/proteanos_plat)" = 'xdev' ]; then printf 'disabled\n' >/etc/rc.policy @@ -20,14 +30,4 @@ if [ "x${1}" = 'xconfigure' ]; then "/etc/init.d/${script}" start done fi - 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 |