Jumpdrive/initramfs/init

42 lines
855 B
Plaintext
Raw Normal View History

#!/bin/sh
2020-03-16 11:13:57 +00:00
## Init script for JumpDrive
## Copyright (C) 2020 - postmarketOS
## Copyright (C) 2020 - Danctl12 <danct12@disroot.org>
. /init_functions.sh
# Environment variables that we want:
IP=172.16.42.1
# Mount things needed by this script
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mkdir /config
mount -t configfs -o nodev,noexec,nosuid configfs /config
# /dev/pts (needed for telnet)
mkdir -p /dev/pts
mount -t devpts devpts /dev/pts
# LED indicator for MMC r/w access
echo mmc2 > /sys/class/leds/pinephone\:green\:user/trigger
# Create all the symlinks to /bin/busybox
echo "Installing Busybox..." && /bin/busybox --install -s
# Create device nodes
echo "Creating device nodes..."
mknod /dev/null c 1 3
mknod /dev/tty c 5 0
mdev -s
# Finishing rescue setup
setup_usb_configfs
start_udhcpd
setup_telnetd
2020-03-16 11:13:57 +00:00
# ToDo: splash
loop_forever