29 lines
529 B
Bash
29 lines
529 B
Bash
#!/bin/sh
|
|
|
|
# Mount special filesystems
|
|
mkdir -p /dev /proc /sys
|
|
[ -c /dev/console ] || mknod -m 600 /dev/console c 5 1
|
|
mount -t proc proc /proc
|
|
mount -t sysfs sysfs /sys
|
|
|
|
# Networking
|
|
echo slim > /proc/sys/kernel/hostname
|
|
ip link set lo up 2>/dev/null
|
|
ip link set eth0 up 2>/dev/null
|
|
# udhcpc -i eth0 -f -q # Get DHCP lease
|
|
|
|
echo
|
|
echo 'Welcome to slim!'
|
|
echo
|
|
|
|
# Start systemd
|
|
exec /sbin/init
|
|
|
|
# Or, just run a shell
|
|
# /bin/sh </dev/console >/dev/console 2>&1
|
|
# poweroff -f
|
|
# while true; do
|
|
# sleep 1
|
|
# poweroff -f
|
|
# done
|