From 0039e02339e3a7b16d139f98a802aa12f2e6f2f9 Mon Sep 17 00:00:00 2001 From: Tomas Hruby Date: Thu, 7 Apr 2011 07:44:23 +0000 Subject: [PATCH] LWIP - scripts This changes to the boot scripts allow switching to lwip simply by setting lwip=yes in the boot monitor. --- etc/rs.inet | 10 ++++++++-- etc/system.conf | 21 +++++++++++++-------- etc/usr/rc | 15 +++++++++++++-- 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/etc/rs.inet b/etc/rs.inet index 9ebb3af62..6d310034a 100755 --- a/etc/rs.inet +++ b/etc/rs.inet @@ -61,8 +61,14 @@ kill_by_name dhcpd kill_by_name nonamed kill_by_name syslogd sleep 3 -service up /usr/sbin/inet -script /etc/rs.inet -daemonize dhcpd +if [ X`/bin/sysenv lwip` = Xyes ] +then + service up /usr/sbin/lwip -script /etc/rs.inet + dhcpd --lwip & +else + service up /usr/sbin/inet -script /etc/rs.inet + daemonize dhcpd +fi daemonize nonamed -L daemonize syslogd diff --git a/etc/system.conf b/etc/system.conf index dc6d45409..962bb653d 100644 --- a/etc/system.conf +++ b/etc/system.conf @@ -312,7 +312,7 @@ service rtl8139 pci device 4033/1360; ipc SYSTEM pm rs log tty ds vm - pci inet amddev + pci inet lwip amddev ; }; @@ -329,7 +329,7 @@ service fxp pci device 8086/2449; ipc SYSTEM pm rs log tty ds vm - pci inet amddev + pci inet lwip amddev ; }; @@ -338,6 +338,11 @@ service inet uid 0; }; +service lwip +{ + uid 0; +}; + service random { }; @@ -549,7 +554,7 @@ service osscore ; ipc SYSTEM pm rs log tty ds vfs vm - pci inet amddev + pci inet lwip amddev ; uid 0; }; @@ -572,7 +577,7 @@ service rtl8169 pci device 1737/1032; ipc SYSTEM pm rs log tty ds vm - pci inet amddev + pci inet lwip amddev ; }; @@ -603,7 +608,7 @@ service e1000 pci device 8086/10de; ipc SYSTEM pm rs log tty ds vm - pci inet ; + pci inet lwip ; }; service atl2 @@ -615,7 +620,7 @@ service atl2 pci device 1969/2048; ipc SYSTEM pm rs tty ds vm - pci inet + pci inet lwip ; }; @@ -629,7 +634,7 @@ service dec21140A pci device 1011/0009; ipc SYSTEM pm rs log tty ds vm - pci inet + pci inet lwip ; }; @@ -641,7 +646,7 @@ service hello ; ipc SYSTEM pm rs log tty ds vm vfs - pci inet amddev + pci inet lwip amddev ; uid 0; }; diff --git a/etc/usr/rc b/etc/usr/rc index 86347a12e..3d0d8d8c0 100644 --- a/etc/usr/rc +++ b/etc/usr/rc @@ -113,7 +113,12 @@ start) arg="-args \"instance=$instance$arg\"" eval up $driver -label $label $arg -period 5HZ done - up inet -script /etc/rs.inet -dev /dev/ip -devstyle STYLE_CLONE + if [ X`/bin/sysenv lwip` = Xyes ] + then + up lwip -script /etc/rs.inet -dev /dev/ip -devstyle STYLE_CLONE + else + up inet -script /etc/rs.inet -dev /dev/ip -devstyle STYLE_CLONE + fi up -n printer -dev /dev/lp -period 10HZ up -n ipc echo . @@ -150,7 +155,13 @@ start) if grep -s 'psip0.*default' /etc/inet.conf >/dev/null then ifconfig -h 10.0.0.1 else - daemonize dhcpd + if [ X`/bin/sysenv lwip` = Xyes ] + then + dhcpd --lwip & + echo -n " dhcpd" + else + daemonize dhcpd + fi fi daemonize nonamed -L if [ -f "$DAEMONS" ] -- 2.44.0