commit 9f25a5f08afb7e8775396928ca8a9b180e943943
Author: sin <sin@2f30.org>
Date: Mon, 16 Sep 2013 19:46:26 +0100
Initial commit
Diffstat:
11 files changed, 106 insertions(+), 0 deletions(-)
diff --git a/bin/hotplug b/bin/hotplug
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+env >> /tmp/hotplug-events
diff --git a/etc/dropbearkeys b/etc/dropbearkeys
@@ -0,0 +1,19 @@
+makekey() {
+ key=$1
+ if [ "$key" = "rsa" ] ; then
+ bits=2048
+ else
+ bits=1024
+ fi
+ filename=dropbear_${key}_host_key
+ rm -f ${filename}.pub
+ rm -f ${filename}
+ dropbearkey -s $bits -t $key -f ${filename} | tail -n2 > ${filename}.pub
+}
+
+dbdir=/etc/dropbear
+mkdir -p $dbdir
+cd $dbdir
+makekey rsa
+makekey dss
+cd - &>/dev/null
diff --git a/etc/group b/etc/group
@@ -0,0 +1,8 @@
+root:x:0:root
+bin:x:1:root,bin,daemon
+daemon:x:2:root,bin,daemon
+sys:x:3:root,bin
+adm:x:4:root,daemon
+tty:x:5:
+disk:x:6:root
+cdrom:x:7:root
diff --git a/etc/netstart b/etc/netstart
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+ifconfig eth0 down
+pkill sdhcp
+ifconfig eth0 up && sdhcp eth0
diff --git a/etc/passwd b/etc/passwd
@@ -0,0 +1,3 @@
+root::0:0:root:/root:/bin/mksh
+bin:x:1:1:bin:/bin:/bin/false
+daemon:x:2:2:daemon:/sbin:/bin/false
diff --git a/etc/rc b/etc/rc
@@ -0,0 +1,34 @@
+. /etc/rc.conf
+
+echo
+echo
+echo " Morpheus"
+echo
+echo
+
+echo Mounting filesystems.
+mkdir -p /dev/pts
+mkdir -p /sys
+mkdir -p /proc
+mount -n -t proc proc /proc
+mount -n -t sysfs sysfs /sys
+mount -n -t devpts devpts /dev/pts
+
+echo Populating /dev nodes.
+smdev -s
+
+echo /bin/smdev > /proc/sys/kernel/hotplug
+
+hostname $HOSTNAME
+
+sh /etc/netstart
+
+if [ -x /etc/dropbearkeys ]; then
+ /etc/dropbearkeys
+fi
+chmod 644 /etc/dropbearkeys
+
+for s in $SVC; do
+ echo Starting $s
+ /etc/rc.d/$s start
+done
diff --git a/etc/rc.conf b/etc/rc.conf
@@ -0,0 +1,2 @@
+HOSTNAME=morpheus
+SVC="dropbear"
diff --git a/etc/rc.d/dropbear b/etc/rc.d/dropbear
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+case "$1" in
+ start)
+ dropbear -B
+ ;;
+ stop)
+ pkill dropbear
+ ;;
+ restart)
+ pkill dropbear
+ dropbear -B
+ ;;
+ *)
+ echo "usage: $0 [start|stop|restart]"
+esac
+exit 0
diff --git a/etc/shells b/etc/shells
@@ -0,0 +1,2 @@
+/bin/sh
+/bin/mksh
diff --git a/init b/init
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+export PATH=/bin:/sbin
+
+. /etc/rc
+
+while :; do
+ /bin/getty 38400 tty1 linux
+done
diff --git a/root/.profile b/root/.profile
@@ -0,0 +1,4 @@
+PATH=/bin:/sbin
+TERM=vt100
+PS1='$(hostname)# '
+export PATH TERM PS1