blob: 671b6899b6719fbedf78ee12e394715225286b30 (
plain) (
blame)
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
|
#!/bin/sh
. /etc/profile
printf "Starting *MIN*imum system\n"
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
|