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