aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcore/minit/build10
-rw-r--r--core/minit/checksums5
-rw-r--r--core/minit/files/launch-services.boot10
-rw-r--r--core/minit/files/minit.post.shutdown1
-rw-r--r--core/minit/files/poweroff2
-rw-r--r--core/minit/files/reboot2
-rwxr-xr-xcore/minit/post-install22
-rw-r--r--core/minit/sources5
-rw-r--r--core/minit/version1
9 files changed, 58 insertions, 0 deletions
diff --git a/core/minit/build b/core/minit/build
new file mode 100755
index 00000000..608e17c4
--- /dev/null
+++ b/core/minit/build
@@ -0,0 +1,10 @@
+#!/bin/sh -e
+
+make
+make DESTDIR="$1" PREFIX=/usr install
+
+ln -s minit "$1/usr/bin/init"
+
+install -Dm755 -t "$1/usr/bin" reboot poweroff
+install -Dm644 launch-services.boot "$1/etc/init/launch-services.boot"
+install -Dm644 minit.post.shutdown "$1/etc/init/minit.post.shutdown"
diff --git a/core/minit/checksums b/core/minit/checksums
new file mode 100644
index 00000000..ba64d758
--- /dev/null
+++ b/core/minit/checksums
@@ -0,0 +1,5 @@
+5ccf4eb8e663be2483ad469470453a7622a0f79d25d9aee8b216867c419888dd 0.1.0.tar.gz
+4da8b0c2771a9046a7ce2ded49beb5297045e9979796e5e4b390168286f05379 poweroff
+f638aaa23383da584d3a56347a8e279abdc7c9c521661ef54a5bc8b955c5632b reboot
+3aa8642d8a1058876f3a47639640a81887298eac992bf15e41fbe420738b09ef launch-services.boot
+4588e3c6337c1f92d3120bebd774fdcd2a85d70f150d68293527798c6e5a031d minit.post.shutdown
diff --git a/core/minit/files/launch-services.boot b/core/minit/files/launch-services.boot
new file mode 100644
index 00000000..6ba14057
--- /dev/null
+++ b/core/minit/files/launch-services.boot
@@ -0,0 +1,10 @@
+# We are going to start runit and getty here
+
+# Uncomment to enable gettys
+# for getty in 1 2 3 4 5 6 ; do
+# while :; do /sbin/getty tty${getty} 0 linux ; done & # busybox getty
+# # while :; do /sbin/getty tty${getty} linux ; done & # ubase getty
+# done
+
+# Uncomment enable runit services
+# while :; do /usr/bin/runsvdir -P /var/service ; done &
diff --git a/core/minit/files/minit.post.shutdown b/core/minit/files/minit.post.shutdown
new file mode 100644
index 00000000..747db7f1
--- /dev/null
+++ b/core/minit/files/minit.post.shutdown
@@ -0,0 +1 @@
+case "$1" in poweroff) /bin/kill -s USR2 1 ;; reboot) /bin/kill -s QUIT 1 ;; esac
diff --git a/core/minit/files/poweroff b/core/minit/files/poweroff
new file mode 100644
index 00000000..69d8731e
--- /dev/null
+++ b/core/minit/files/poweroff
@@ -0,0 +1,2 @@
+#!/bin/sh
+/bin/kill -s USR1 1
diff --git a/core/minit/files/reboot b/core/minit/files/reboot
new file mode 100644
index 00000000..266afb92
--- /dev/null
+++ b/core/minit/files/reboot
@@ -0,0 +1,2 @@
+#!/bin/sh
+/bin/kill -s INT 1
diff --git a/core/minit/post-install b/core/minit/post-install
new file mode 100755
index 00000000..5e5ef583
--- /dev/null
+++ b/core/minit/post-install
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+cat <<EOF
+
+!! IMPORTANT !!
+
+In order to start using minit,
+you have to uncomment some entries on
+your /etc/init/launch-services.boot
+
+These depend on which getty you are
+using, and whether you are using a
+system supervisor or not.
+
+NOTE: If you are currently booted with
+ busybox-init you can poweroff/reboot
+ by running
+
+ busybox-init poweroff
+ busybox-init reboot
+
+EOF
diff --git a/core/minit/sources b/core/minit/sources
new file mode 100644
index 00000000..b615bd1f
--- /dev/null
+++ b/core/minit/sources
@@ -0,0 +1,5 @@
+https://github.com/cemkeylan/minit/archive/0.1.0.tar.gz
+files/poweroff
+files/reboot
+files/launch-services.boot
+files/minit.post.shutdown
diff --git a/core/minit/version b/core/minit/version
new file mode 100644
index 00000000..6c5d3836
--- /dev/null
+++ b/core/minit/version
@@ -0,0 +1 @@
+0.1.0 1