3 # T2 SDE: target/share/install/rootfs/sbin/init
4 # Partially based on linuxrc.c, Copyright (C) 2003, 2004 Clifford Wolf and Rene Rebe
5 # Converted from C to shell, heavily cleaned and improved for the T2 SDE by:
6 # (C)2005-2021 Rene Rebe, ExactCODE GmbH; Germany.
8 export PATH
="/sbin:/bin:/usr/sbin:/usr/bin"
12 ln -sf /proc
/kcore core
13 ln -sf /proc
/self
/fd fd
21 T2 SDE installer (2nd stage)
23 The 2nd stage is a small Linux distribution, loaded into your system's memory.
24 It has everything needed to install T2 Linux, restore an old installation,
25 perform some administrative or backup tasks."
27 for x
in /etc
/setup-
*.sh
/setup
/setup.sh
; do
29 echo; echo "Running $x ..."; sh
$x
30 echo "Setup script $x finished."
34 ttydevs
="console= `cat /proc/cmdline`"; ttydevs
=${ttydevs##*console=}; ttydevs
=${ttydevs%% *}
35 if [ ! "$ttydevs" ]; then
36 ttydevs
="`grep -a -H Y /sys/class/tty/*/console`"
37 ttydevs
="${ttydevs%%/console*}"; ttydevs
=${ttydevs##*/}
39 ttydevs
="${ttydevs:-tty1 tty2 tty3 tty4 tty5 tty6}"
42 If you use a serial terminal, enter the names of terminal devices to use,
43 for example 'ttyS0' or 'ttyUSB0' for the first serial port or just 'console',
44 just hit enter otherwise. (default: $ttydevs): "
46 if [ "$_ttydevs" ]; then # check
47 for x
in $_ttydevs; do
49 echo "$x is not a char-device." && continue 2
57 If you don't know what to do, it's a good time to read the T2 documentation.
58 To start a normal installation, simply run: 'install'"
60 if type -p dialog
> /dev
/null
; then
61 echo "(or 'install -text' if you prefer non-dialog based menus)"
64 https://t2sde.org/support"
67 ( ( while : ; do agetty
-i -J $x -n -N -l /sbin
/login-shell
; done ) & )
70 exec < /dev
/null
> /dev
/null
2>&1
71 while : ; do sleep 1; done