aboutsummaryrefslogtreecommitdiff
path: root/local/etc/rc.init
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2018-04-16 00:51:48 -0400
committerMitch Riedstra <mitch@riedstra.us>2018-04-16 00:51:48 -0400
commit25a1cb19b213f7825fcc080a29991beeb70f6b93 (patch)
tree260a4854d907c72f20cd5e206b0aad3fd0f85e7c /local/etc/rc.init
parent104f042ddbef56e323b61353fceeb5fd3dae5556 (diff)
downloadmin-25a1cb19b213f7825fcc080a29991beeb70f6b93.tar.gz
min-25a1cb19b213f7825fcc080a29991beeb70f6b93.tar.xz
It works!
A getty now spawns on the serial console on boot Todo: DNS resolution doesn't work yet. DHCP for eth0? SSH server? `tmux`? ------- Added busybox config Switched the pathing around yet again in the `inc` file Added `local` files to be copied into the prefix before creating the tarball ( TODO ) Added tree command to the build Install runit
Diffstat (limited to 'local/etc/rc.init')
-rw-r--r--local/etc/rc.init23
1 files changed, 23 insertions, 0 deletions
diff --git a/local/etc/rc.init b/local/etc/rc.init
new file mode 100644
index 0000000..1fcf4c8
--- /dev/null
+++ b/local/etc/rc.init
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+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
+
+
+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
+
+# It's going to be interesting to figure out what this one does.
+ln -s /proc/self/fd /dev/fd
+
+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
+