source: trunk/debian/rootfs/files/octeon-native/etc/init.d/rcS.firstboot.ubnt @ 913

Last change on this file since 913 was 913, checked in by amain, 6 years ago

rootfs: octeon-native update

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/bin/sh
2
3export PATH=/bin:/usr/bin:/sbin:/usr/sbin
4
5# 1. mount
6/bin/mount -n -o remount,rw /
7/bin/mount -t proc  none /proc
8/bin/mount -t sysfs none /sys
9
10/bin/mkdir -p /dev/pts/
11/bin/mount -t devpts none /dev/pts/
12
13
14# 2. sysctl
15for file in /etc/ubnt/sysctl.d/*.conf; do
16    /sbin/sysctl -q -p "$file"
17done
18
19
20# Load platform module
21modprobe ubnt_platform
22
23# Run platform startup script
24/etc/ubnt/ubnt-rcS/start-e.e102
25
26# Setup lo
27/sbin/ifconfig lo 127.0.0.1 up
28
29# Setup the network
30/sbin/ifconfig eth1 10.0.2.238 netmask 255.255.255.0 up
31/sbin/ifconfig eth2 192.168.2.1 netmask 255.255.255.0 up
32/bin/ip r add default via 10.0.2.1
33
34# Run SSHd in background - nice scp-ing
35/usr/sbin/sshd -D &
36
37# Run rsyslogd
38/etc/init.d/rsyslog start
39
40# Setting hostnams
41/bin/hostname `cat /etc/hostname`
42
43# enable ipv4 forwarding
44echo 1 >/proc/sys/net/ipv4/ip_forward
45
46# start firewall
47/etc/firewall/firewallu.sh start
48
49# netfilter logging
50modprobe xt_LOG
51modprobe nf_conntrack
52echo "ipt_LOG" >/proc/sys/net/netfilter/nf_log/2
53echo 255 >/proc/sys/net/netfilter/nf_conntrack_log_invalid
54echo 1 >/proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal
55
56# Start bash
57/bin/bash
58
59# Normal boot procedure
60exec /etc/init.d/rc S
Note: See TracBrowser for help on using the repository browser.