Files
nova-os/rootfs/init
T

48 lines
1.0 KiB
Bash
Raw Normal View History

#!/bin/sh
#
# Nova OS - init
# Linux 7.0.12-nova-os — "Burn bright, run light."
#
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
echo ""
echo " ╔══════════════════════════════════════╗"
echo " ║ N O V A O S ║"
echo " ║ kernel 7.0.12-nova-os ║"
echo " ║ \"Burn bright, run light.\" ║"
echo " ╚══════════════════════════════════════╝"
echo ""
# Mount essential filesystems
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devtmpfs none /dev
mount -t tmpfs none /tmp
mount -t tmpfs none /run
# Populate /dev
mdev -s
# Mount root writable
mount -o remount,rw /
# Set hostname
hostname nova-os
# Bring up loopback
ifconfig lo 127.0.0.1 up
# Start logging
syslogd
echo ":: Nova OS ready."
echo ""
# Run the configured inittab if it exists
if [ -f /etc/inittab ]; then
exec init
fi
# Fallback: spawn a shell
exec cttyhack sh