Skip to content
This repository was archived by the owner on Jun 18, 2020. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/core0/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (b *Bootstrap) setupNetworking() error {
<-time.After(3 * time.Second)
}

log.Warning("can not reach interent, continue booting anyway")
log.Warning("can not reach internet, continue booting anyway")
return nil
}

Expand Down
22 changes: 22 additions & 0 deletions apps/core0/conf/getty.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# NOTICE:
# This file will give any user with physical access to the node
# full access to the system, include in the image on your own risk
#
# busybox setsid getty -I -n -l /sbin/login.sh 0 /dev/tty3

[startup.getty]
name = 'core.system'
after = ['init']
condition = 'development'
# the job is not marked as protected, instead we respawn the shell
# from the direct-login.sh script, because busybox setsid doesn't
# support the -w flag (wait for process to exit), it means with protected=true
# the system will keep spawning gettys infinitely.

[startup.getty.args]
name = "busybox"
args = [
'setsid',
'getty', '-l', '/usr/bin/direct-login.sh',
'0', '/dev/tty3'
]
5 changes: 2 additions & 3 deletions apps/core0/conf/zerotier.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
[startup."zerotier-init"]
name = "bash"
running_delay = -1
after = ["init"]

[startup."zerotier-init".args]
"not(ztid)|script" = """
ztid -out /tmp/zt
ztid -debug -out /tmp/zt
"""

"ztid|script" = """
Expand All @@ -21,7 +20,7 @@ chmod 0400 /tmp/zt/identity.secret

[startup.zerotier]
name = "core.system"
after = ["net", "zerotier-init"]
after = ["zerotier-init"]
protected = true

[startup.zerotier.args]
Expand Down
7 changes: 7 additions & 0 deletions tools/direct-login.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

# this script relates to the core0/conf/getty.toml file
while true; do
/bin/sh
echo "respawing shell"
done