2015-05-19 09:06:54 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2015-06-16 09:14:50 +00:00
|
|
|
# Create all the symlinks to /bin/busybox
|
2015-05-19 09:39:39 +00:00
|
|
|
/bin/busybox --install -s
|
|
|
|
|
2015-06-16 09:14:50 +00:00
|
|
|
# Mount things needed by this script
|
2015-05-19 09:06:54 +00:00
|
|
|
mount -t proc proc /proc
|
|
|
|
mount -t sysfs sysfs /sys
|
|
|
|
|
2015-06-16 09:14:50 +00:00
|
|
|
# Disable kernel messages from popping onto the screen
|
2015-05-19 09:06:54 +00:00
|
|
|
echo 0 > /proc/sys/kernel/printk
|
|
|
|
|
2015-06-16 09:14:50 +00:00
|
|
|
# Create device nodes
|
2015-05-19 09:06:54 +00:00
|
|
|
mknod /dev/null c 1 3
|
|
|
|
mknod /dev/tty c 5 0
|
|
|
|
mdev -s
|
|
|
|
|
2015-06-15 19:57:48 +00:00
|
|
|
# udev stuff
|
|
|
|
kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf
|
|
|
|
systemd-tmpfiles --prefix=/dev --create --boot
|
|
|
|
/usr/lib/systemd/systemd-udevd --daemon --resolve-names=never
|
|
|
|
udevadm trigger --action=add --type=subsystems
|
|
|
|
udevadm trigger --action=add --type=devices
|
|
|
|
udevadm settle
|
2015-05-19 09:06:54 +00:00
|
|
|
|
2015-06-16 09:14:50 +00:00
|
|
|
# /bin/sshd
|
|
|
|
|
|
|
|
# Generate keys for sshd
|
|
|
|
echo "Generating keys for sshd"
|
|
|
|
ssh-keygen -A
|
2015-05-19 09:06:54 +00:00
|
|
|
|
|
|
|
exec sh
|