-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·54 lines (38 loc) · 1.33 KB
/
install
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
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
# ===================================================================
cat << EOF >> /etc/resolv.conf
nameserver 192.168.1.1
nameserver 1.1.1.1
nameserver 8.8.8.8
EOF
# ===================================================================
apk add vim openssh dhcpcd bash openrc xterm podman
# ===================================================================
cat << 'EOF' > /etc/init.d/shell
#!/sbin/openrc-run
command=/bin/sh /bin/init
start() {
ebegin "Starting shell"
exec ${command}
eend $?
}
EOF
chmod +x /etc/init.d/shell
# ===================================================================
rc-update add sshd default
rc-update add dhcpcd default
rc-update add shell default
rc-update add cgroups default
# ===================================================================
cat << EOF > /root/.bashrc
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w# '
EOF
# ===================================================================
cat << EOF > /etc/fstab
proc /proc proc defaults 0 0
tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0
sysfs /sys sysfs defaults 0 0
EOF
# ===================================================================
mkdir -p /run /run/lock /var/run