blob: 72121f9ad817a1a34b69d4342057349ad2e94747 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#!/bin/sh
MAKEDEPS="make s6-linux-init s6-rc"
DEPS="sh eudev s6 s6-rc s6-linux-utils s6-protable-utils s6-linux-init"
SOURCE=https://xi.davidovski.xyz/git/bootscripts.git
DESC="Bootscripts to initiate the system on boot"
package () {
make DESTDIR=$PKG_DEST bootscripts
cat > $PKG_DEST/etc/inittab << "EOF"
# Begin /etc/inittab
id:3:initdefault:
si::sysinit:/etc/rc.d/init.d/rc S
l0:0:wait:/etc/rc.d/init.d/rc 0
l1:S1:wait:/etc/rc.d/init.d/rc 1
l2:2:wait:/etc/rc.d/init.d/rc 2
l3:3:wait:/etc/rc.d/init.d/rc 3
l4:4:wait:/etc/rc.d/init.d/rc 4
l5:5:wait:/etc/rc.d/init.d/rc 5
l6:6:wait:/etc/rc.d/init.d/rc 6
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
su:S016:once:/sbin/sulogin
1:2345:respawn:/sbin/agetty --noclear tty1 9600
2:2345:respawn:/sbin/agetty tty2 9600
3:2345:respawn:/sbin/agetty tty3 9600
4:2345:respawn:/sbin/agetty tty4 9600
5:2345:respawn:/sbin/agetty tty5 9600
6:2345:respawn:/sbin/agetty tty6 9600
# End /etc/inittab
EOF
# Compile a basic database for boot
s6-rc-compile /etc/s6/db/basic /etc/s6/sv
ln -s /etc/s6/db/basic /etc/s6/db/current
# initialize s6 init base.
s6-linux-init-maker -1 -t 2 -L \
-f $PKG_DEST/etc/s6linux-init/skel \
-p "/usr/bin:/usr/sbin:/bin:/sbin" \
-D default \
-G "/sbin/agetty -L -8 tty1 115200" \
-c $PKG_DEST/etc/s6/base -u root -U utmp $PKG_DEST/etc/s6/base
}
|