about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2014-08-07 17:31:52 +0200
committerJuan RP <xtraeme@gmail.com>2014-08-07 17:31:52 +0200
commit782e8546a65cdad914223413a8ad1c9be9e9a355 (patch)
treeee037c1ec2d3c99c2f815ef4d81bc6cace16d046
parent53a09fa9d57bad1b074d0f72a302ffc4517d4b0f (diff)
downloadrunit-void-782e8546a65cdad914223413a8ad1c9be9e9a355.tar.gz
runit-void-782e8546a65cdad914223413a8ad1c9be9e9a355.tar.xz
runit-void-782e8546a65cdad914223413a8ad1c9be9e9a355.zip
Make core-services just shell snippets and source them from 1; idea from @chneukirchen.
-rwxr-xr-x12
-rwxr-xr-xcore-services/00-pseudofs.sh7
-rwxr-xr-xcore-services/02-udev.sh4
-rwxr-xr-xcore-services/03-filesystems.sh4
-rwxr-xr-xcore-services/04-swap.sh4
-rwxr-xr-xcore-services/05-misc.sh4
-rwxr-xr-xcore-services/06-console-setup.sh4
-rwxr-xr-xcore-services/07-kmods.sh4
-rwxr-xr-xcore-services/08-sysctl.sh4
-rwxr-xr-xcore-services/99-cleanup.sh4
10 files changed, 2 insertions, 39 deletions
diff --git a/1 b/1
index 2f437ed..62aa0ea 100755
--- a/1
+++ b/1
@@ -12,7 +12,7 @@ msg "Welcome to Void!\n"
 # Start core services: one-time system tasks.
 detect_virt
 for f in /etc/runit/core-services/*.sh; do
-    [ -x $f ] && $f
+    [ -r $f ] && . $f
 done
 
 dmesg >/var/log/dmesg.log
diff --git a/core-services/00-pseudofs.sh b/core-services/00-pseudofs.sh
index f0da22f..2bdc69e 100755
--- a/core-services/00-pseudofs.sh
+++ b/core-services/00-pseudofs.sh
@@ -1,9 +1,4 @@
-#!/bin/sh
-
-PATH=/usr/bin:/usr/sbin
-
-. /etc/runit/functions
-[ -r /etc/rc.conf ] && . /etc/rc.conf
+# vim: set ts=4 sw=4 et:
 
 msg "Mounting pseudo-filesystems...\n"
 mountpoint -q /proc || mount -t proc proc /proc -o nosuid,noexec,nodev
diff --git a/core-services/02-udev.sh b/core-services/02-udev.sh
index 1375209..84b40fc 100755
--- a/core-services/02-udev.sh
+++ b/core-services/02-udev.sh
@@ -1,9 +1,5 @@
-#!/bin/sh
 # vim: set ts=4 sw=4 et:
 
-. /etc/runit/functions
-[ -r /etc/rc.conf ] && . /etc/rc.conf
-
 [ -n "$VIRTUALIZATION" ] && return 0
 
 if [ -x /usr/lib/systemd/systemd-udevd ]; then
diff --git a/core-services/03-filesystems.sh b/core-services/03-filesystems.sh
index 02df01a..d30c0e5 100755
--- a/core-services/03-filesystems.sh
+++ b/core-services/03-filesystems.sh
@@ -1,9 +1,5 @@
-#!/bin/sh
 # vim: set ts=4 sw=4 et:
 
-. /etc/runit/functions
-[ -r /etc/rc.conf ] && . /etc/rc.conf
-
 [ -n "$VIRTUALIZATION" ] && return 0
 
 msg "Remounting rootfs read-only...\n"
diff --git a/core-services/04-swap.sh b/core-services/04-swap.sh
index f1db240..22b2ee4 100755
--- a/core-services/04-swap.sh
+++ b/core-services/04-swap.sh
@@ -1,9 +1,5 @@
-#!/bin/sh
 # vim: set ts=4 sw=4 et:
 
-. /etc/runit/functions
-[ -r /etc/rc.conf ] && . /etc/rc.conf
-
 [ -n "$VIRTUALIZATION" ] && return 0
 
 msg "Initializing swap...\n"
diff --git a/core-services/05-misc.sh b/core-services/05-misc.sh
index fba6d2a..b2e41d4 100755
--- a/core-services/05-misc.sh
+++ b/core-services/05-misc.sh
@@ -1,9 +1,5 @@
-#!/bin/sh
 # vim: set ts=4 sw=4 et:
 
-. /etc/runit/functions
-[ -r /etc/rc.conf ] && . /etc/rc.conf
-
 msg "Setting up loopback interface...\n"
 ip link set up dev lo
 
diff --git a/core-services/06-console-setup.sh b/core-services/06-console-setup.sh
index 63fea25..715b962 100755
--- a/core-services/06-console-setup.sh
+++ b/core-services/06-console-setup.sh
@@ -1,9 +1,5 @@
-#!/bin/sh
 # vim: set ts=4 sw=4 et:
 
-. /etc/runit/functions
-[ -r /etc/rc.conf ] && . /etc/rc.conf
-
 [ -n "$VIRTUALIZATION" ] && return 0
 
 msg "Setting up TTYs to unicode mode...\n"
diff --git a/core-services/07-kmods.sh b/core-services/07-kmods.sh
index 07a5310..32639e3 100755
--- a/core-services/07-kmods.sh
+++ b/core-services/07-kmods.sh
@@ -1,9 +1,5 @@
-#!/bin/sh
 # vim: set ts=4 sw=4 et:
 
-. /etc/runit/functions
-[ -r /etc/rc.conf ] && . /etc/rc.conf
-
 [ -n "$VIRTUALIZATION" ] && return 0
 
 msg "Loading kernel modules...\n"
diff --git a/core-services/08-sysctl.sh b/core-services/08-sysctl.sh
index febe7bb..6616784 100755
--- a/core-services/08-sysctl.sh
+++ b/core-services/08-sysctl.sh
@@ -1,9 +1,5 @@
-#!/bin/sh
 # vim: set ts=4 sw=4 et:
 
-. /etc/runit/functions
-[ -r /etc/rc.conf ] && . /etc/rc.conf
-
 if [ -x /sbin/sysctl ]; then
     msg "Loading sysctl(8) settings...\n"
     sysctl --system
diff --git a/core-services/99-cleanup.sh b/core-services/99-cleanup.sh
index 8030b4f..fff258f 100755
--- a/core-services/99-cleanup.sh
+++ b/core-services/99-cleanup.sh
@@ -1,8 +1,4 @@
 #!/bin/sh
-# vim: set ts=4 sw=4 et:
-
-. /etc/runit/functions
-[ -r /etc/rc.conf ] && . /etc/rc.conf
 
 install -m0664 -o root -g utmp /dev/null /run/utmp
 install -dm1777 /tmp/.X11-unix /tmp/.ICE-unix