nat-spec-surge-server.rcS revision 1242:c7f56fec0cb2
1#!/bin/sh 2# 3# /etc/init.d/rcS 4# 5NATBOX=192.168.0.7 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 26 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 31 32echo "524287" > /proc/sys/net/core/rmem_max 33echo "524287" > /proc/sys/net/core/wmem_max 34echo "524287" > /proc/sys/net/core/optmem_max 35echo "300000" > /proc/sys/net/core/netdev_max_backlog 36 37echo "131072" > /proc/sys/fs/file-max 38echo "done." 39 40echo -n "mounting file set..." 41mkdir -p /z/htdocs 42mount /dev/hdb1 /z/htdocs 43echo "done." 44 45echo -n "starting httpd..." 46/benchmarks/apache2/bin/apachectl start 47sleep 2 48cat /benchmarks/apache2/logs/error_log 49echo "done." 50 51echo "notifying natbox..." 52echo "server ready" | /usr/bin/netcat -c $NATBOX 8000 53echo "done" 54 55echo -n "starting bash shell..." 56/bin/bash 57