summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-01-27 17:55:56 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-01-27 17:55:56 +0100
commit0f55856e02b30c9cc41df0c75bccf7f2881cfe93 (patch)
treec367bdec2245556b70b0a6b2c626f6c2f9445891
parent4a8a2b2d662f5de300d789d31078b9d75e94106a (diff)
downloadrvnit-0f55856e02b30c9cc41df0c75bccf7f2881cfe93.tar.gz
rvnit-0f55856e02b30c9cc41df0c75bccf7f2881cfe93.tar.xz
rvnit-0f55856e02b30c9cc41df0c75bccf7f2881cfe93.zip
contrib: update
-rw-r--r--contrib/README2
-rwxr-xr-xcontrib/rvnit-init12
-rwxr-xr-xcontrib/rvnit/00Kpoweroff11
-rwxr-xr-xcontrib/rvnit/01Kremount9
-rwxr-xr-xcontrib/rvnit/02Kkillall9
-rwxr-xr-xcontrib/rvnit/04Dudevd18
-rwxr-xr-xcontrib/rvnit/04Kudev (renamed from contrib/rvnit/30Dudevd)1
-rwxr-xr-xcontrib/rvnit/05Sudev (renamed from contrib/rvnit/04Sudev)3
-rwxr-xr-xcontrib/rvnit/08Kmisc2
-rw-r--r--contrib/rvnit/10Sbash3
-rw-r--r--contrib/rvnit/11Sslow5
-rwxr-xr-xcontrib/rvnit/21Glog3
-rwxr-xr-xcontrib/rvnit/90Dagetty-tty13
13 files changed, 55 insertions, 26 deletions
diff --git a/contrib/README b/contrib/README
index 09bd6b7..1d78f51 100644
--- a/contrib/README
+++ b/contrib/README
@@ -1,2 +1,4 @@
 This directory contains totally unsupported scripts
 to boot Void Linux with rvnit.
+
+Use init=/usr/bin/rvnit
diff --git a/contrib/rvnit-init b/contrib/rvnit-init
deleted file mode 100755
index 96786ea..0000000
--- a/contrib/rvnit-init
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-PATH=/usr/bin:/usr/sbin
-export PATH
-
-# control tty
-exec </dev/tty1 >/dev/tty1 2>&1
-
-mountpoint -q /proc || mount -o nosuid,noexec,nodev -t proc proc /proc
-mountpoint -q /run || mount -o mode=0755,nosuid,nodev -t tmpfs run /run
-
-ctrlaltdel soft
-exec /bin/rvnit /etc/rvnit
diff --git a/contrib/rvnit/00Kpoweroff b/contrib/rvnit/00Kpoweroff
deleted file mode 100755
index 2fae082..0000000
--- a/contrib/rvnit/00Kpoweroff
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-echo system halted.
-sync
-
-sleep 10
-
-if [ -n "$RVNIT_WANT_REBOOT" ]; then
-	reboot -f
-else
-	halt -f
-fi
diff --git a/contrib/rvnit/01Kremount b/contrib/rvnit/01Kremount
new file mode 100755
index 0000000..a2559f3
--- /dev/null
+++ b/contrib/rvnit/01Kremount
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -x
+
+fuser -v -m /  2>&1 |grep F
+sleep 1
+
+swapoff -a
+umount -r -a -t nosysfs,noproc,nodevtmpfs,notmpfs
+mount -o remount,ro /
diff --git a/contrib/rvnit/02Kkillall b/contrib/rvnit/02Kkillall
new file mode 100755
index 0000000..c6e59f1
--- /dev/null
+++ b/contrib/rvnit/02Kkillall
@@ -0,0 +1,9 @@
+#!/bin/sh
+exec 1>&2
+set -x
+ps ax
+pkill --inverse -s0,1 -TERM
+sleep 1
+pkill --inverse -s0,1 -KILL
+sleep 1
+ps ax
diff --git a/contrib/rvnit/04Dudevd b/contrib/rvnit/04Dudevd
new file mode 100755
index 0000000..318c7e8
--- /dev/null
+++ b/contrib/rvnit/04Dudevd
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+. /etc/runit/functions
+
+# vim: set ts=4 sw=4 et:
+
+[ -n "$VIRTUALIZATION" ] && return 0
+
+if [ -x /usr/lib/systemd/systemd-udevd ]; then
+    _udevd=/usr/lib/systemd/systemd-udevd
+elif [ -x /sbin/udevd -o -x /bin/udevd ]; then
+    _udevd=udevd
+else
+    msg_warn "cannot find udevd!"
+    exit 111
+fi
+
+exec ${_udevd} 2>&1
diff --git a/contrib/rvnit/30Dudevd b/contrib/rvnit/04Kudev
index a3a396b..b9cdb84 100755
--- a/contrib/rvnit/30Dudevd
+++ b/contrib/rvnit/04Kudev
@@ -1,3 +1,2 @@
 #!/bin/sh
 udevadm control --exit
-exec udevd 2>&1
diff --git a/contrib/rvnit/04Sudev b/contrib/rvnit/05Sudev
index d1b0697..fa910ff 100755
--- a/contrib/rvnit/04Sudev
+++ b/contrib/rvnit/05Sudev
@@ -15,8 +15,7 @@ else
 fi
 
 if [ -n "${_udevd}" ]; then
-    msg "Starting udev and waiting for devices to settle..."
-    ${_udevd} --daemon
+    msg "Waiting for devices to settle..."
     udevadm trigger --action=add --type=subsystems
     udevadm trigger --action=add --type=devices
     udevadm settle
diff --git a/contrib/rvnit/08Kmisc b/contrib/rvnit/08Kmisc
new file mode 100755
index 0000000..80f89c0
--- /dev/null
+++ b/contrib/rvnit/08Kmisc
@@ -0,0 +1,2 @@
+#!/bin/sh
+halt -w # for wtmp
diff --git a/contrib/rvnit/10Sbash b/contrib/rvnit/10Sbash
new file mode 100644
index 0000000..94d1f2f
--- /dev/null
+++ b/contrib/rvnit/10Sbash
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+bash
diff --git a/contrib/rvnit/11Sslow b/contrib/rvnit/11Sslow
new file mode 100644
index 0000000..cbee673
--- /dev/null
+++ b/contrib/rvnit/11Sslow
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+set -e
+trap bash INT ERR
+sleep 30
diff --git a/contrib/rvnit/21Glog b/contrib/rvnit/21Glog
new file mode 100755
index 0000000..dca879a
--- /dev/null
+++ b/contrib/rvnit/21Glog
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec svlogd /var/log/mysocklog/*
diff --git a/contrib/rvnit/90Dagetty-tty1 b/contrib/rvnit/90Dagetty-tty1
new file mode 100755
index 0000000..d0931fe
--- /dev/null
+++ b/contrib/rvnit/90Dagetty-tty1
@@ -0,0 +1,3 @@
+#!/bin/sh
+tty=${0##*-}
+exec agetty --noclear "${tty}" 38400 linux