aboutsummaryrefslogtreecommitdiff
path: root/local/etc
diff options
context:
space:
mode:
Diffstat (limited to 'local/etc')
-rw-r--r--local/etc/group3
-rw-r--r--local/etc/passwd2
-rwxr-xr-xlocal/etc/runit/120
-rwxr-xr-xlocal/etc/sv/getty-tty0/run4
-rwxr-xr-xlocal/etc/sv/sshd/run3
5 files changed, 22 insertions, 10 deletions
diff --git a/local/etc/group b/local/etc/group
index 18acc30..0146ee7 100644
--- a/local/etc/group
+++ b/local/etc/group
@@ -1 +1,4 @@
root:x:0:root
+ssh:x:22:
+nogroup:x:65533:
+nobody:x:65534:
diff --git a/local/etc/passwd b/local/etc/passwd
index 7710014..cf4d7f7 100644
--- a/local/etc/passwd
+++ b/local/etc/passwd
@@ -1 +1,3 @@
root:x:0:0:root:/root:/bin/mksh
+sshd:x:22:22:sshd:/var/empty:/bin/false
+nobody:x:65534:65534:nobody:/var/empty:/bin/false
diff --git a/local/etc/runit/1 b/local/etc/runit/1
index 671b689..b22c9ef 100755
--- a/local/etc/runit/1
+++ b/local/etc/runit/1
@@ -2,26 +2,26 @@
. /etc/profile
-printf "Starting *MIN*imum system\n"
+set -x
-mkdir -p /dev
-mountpoint -q /dev || mount -t devtmpfs dev /dev -o mode=0755,nosuid
-mkdir -p /dev/pts
-mountpoint -q /dev/pts || mount -n -t devpts devpts /dev/pts -o mode=0620,gid=5,nosuid,noexec,noatime
+printf "Starting *MIN*imum system\n"
mkdir -p /proc /sys
mountpoint -q /proc || mount -t proc proc /proc -o nosuid,noexec,nodev,hidepid=2
mountpoint -q /sys || mount -t sysfs sys /sys -o nosuid,noexec,nodev
-mkdir -p /dev/shm
-mountpoint -q /dev/shm || mount -n -t tmpfs shm /dev/shm -o mode=1777,nosuid,nodev,noatime
+mkdir -p /dev/pts
+mountpoint -q /dev/pts || mount -n -t devpts devpts /dev/pts -o \
+ mode=0620,gid=5,nosuid,noexec,noatime
+mdev -s
-# It's going to be interesting to figure out what this one does.
-ln -s /proc/self/fd /dev/fd
+mkdir -p /dev/shm
+mountpoint -q /dev/shm || mount -n -t tmpfs shm /dev/shm -o \
+ mode=1777,nosuid,nodev,noatime
mountpoint -q /sys/fs/cgroup || mount -n -t cgroup nodev /sys/fs/cgroup
printf "Setting up loopback.\n"
[ -d /sys/class/net/lo ] && ifconfig lo up
-
+if [ -e /etc/net ] ; then . /etc/net ; fi
diff --git a/local/etc/sv/getty-tty0/run b/local/etc/sv/getty-tty0/run
new file mode 100755
index 0000000..4fd121c
--- /dev/null
+++ b/local/etc/sv/getty-tty0/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+. /etc/profile
+
+getty tty0 38400 vt100
diff --git a/local/etc/sv/sshd/run b/local/etc/sv/sshd/run
new file mode 100755
index 0000000..8e5081a
--- /dev/null
+++ b/local/etc/sv/sshd/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+ssh-keygen -A
+/usr/sbin/sshd -D