From 782e8546a65cdad914223413a8ad1c9be9e9a355 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 7 Aug 2014 17:31:52 +0200 Subject: Make core-services just shell snippets and source them from 1; idea from @chneukirchen. --- 1 | 2 +- core-services/00-pseudofs.sh | 7 +------ core-services/02-udev.sh | 4 ---- core-services/03-filesystems.sh | 4 ---- core-services/04-swap.sh | 4 ---- core-services/05-misc.sh | 4 ---- core-services/06-console-setup.sh | 4 ---- core-services/07-kmods.sh | 4 ---- core-services/08-sysctl.sh | 4 ---- core-services/99-cleanup.sh | 4 ---- 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 -- cgit 1.4.1