1#!/bin/sh 2# 3# /etc/init.d/rcS 4# 5 6echo -n "mounting swap..." 7/sbin/swapon /dev/hdc 8echo "done." 9 10echo -n "setting up network..." 11/sbin/ifconfig eth0 192.168.0.1 txqueuelen 1000 12/sbin/ifconfig eth0:1 192.168.0.2 txqueuelen 1000 13/sbin/ifconfig eth0:2 192.168.0.3 txqueuelen 1000 14/sbin/ifconfig eth0:3 192.168.0.4 txqueuelen 1000 15/sbin/ifconfig eth0:4 192.168.0.5 txqueuelen 1000 16/sbin/ifconfig lo 127.0.0.1 17 18echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle 19echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse 20echo "1" > /proc/sys/net/ipv4/tcp_window_scaling 21echo "0" > /proc/sys/net/ipv4/tcp_timestamps 22echo "0" > /proc/sys/net/ipv4/tcp_sack 23echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout 24echo "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog 25echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max 26echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range 27echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem 28echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem 29echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem 30echo "524287" > /proc/sys/net/core/rmem_max 31echo "524287" > /proc/sys/net/core/wmem_max 32echo "524287" > /proc/sys/net/core/optmem_max 33echo "300000" > /proc/sys/net/core/netdev_max_backlog 34echo "131072" > /proc/sys/fs/file-max 35echo "done." 36 37echo -n "mounting file set..." 38mkdir -p /z/htdocs 39mount /dev/hdb1 /z/htdocs 40echo "done." 41 42echo -n "starting httpd..." 43/usr/sbin/apache2 -f /etc/apache2/httpd.conf -k start 44sleep 2 45cat /usr/share/apache2/logs/error_log 46echo "done." 47 48echo "notifying client..." 49echo "server ready" | netcat -c 192.168.0.10 8000 50echo "done" 51 52echo -n "starting bash shell..." 53/bin/bash 54