source: trunk/debian/rootfs/files/etc/init.d/rcS.firstboot @ 301

Last change on this file since 301 was 301, checked in by amain, 9 years ago

rootfs: fix post install to install debwrt cross compiled packages

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#! /bin/sh
2
3### BEGIN INIT INFO
4# Provides:             rcS
5# Required-Start:       
6# Required-Stop:       
7# Default-Start:       
8# Default-Stop:         
9# Short-Description:    first boot run control start for Debwrt
10### END INIT INFO
11
12# Mount root read-write
13/bin/mount -n -o remount,rw /dev/root /
14
15# Mount proc - why not? :-)
16/bin/mount -t proc none /proc
17
18# Setup the network
19/sbin/ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up
20/sbin/ifconfig eth0:1 192.168.1.20 netmask 255.255.255.0 up
21
22# Mount devpts to allow telnet and ssh logins
23/bin/mkdir -p /dev/pts/
24/bin/mount -t devpts none /dev/pts/
25
26# Run telnetd in background
27while true; do /usr/sbin/in.telnetd -debug 23; /bin/sleep 1; done&
28
29# Run SSHd in background - nice scp-ing
30/usr/sbin/sshd -D &
31
32# Setting hostnams
33/bin/hostname `cat /etc/hostname`
34
35# Run bash instead of normal boot procedure
36/bin/echo
37/bin/echo "Welcome to the DebWrt post installation!"
38/bin/echo
39/bin/echo "Press ctrl-d for normal boot. Use vim.tiny to edit files."
40/bin/echo
41/bin/echo "Note that both telnetd and sshd are running on: 192.168.1.1 and on 192.168.1.20."
42/bin/echo
43/bin/echo "Run /usr/sbin/PostInstall to complete the second stage installation"
44
45# Start bash
46/bin/bash
47
48# Normal boot procedure
49exec /etc/init.d/rc S
Note: See TracBrowser for help on using the repository browser.