aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2007-11-28 14:47:09 -0600
committerAaron Griffin <aaronmgriffin@gmail.com>2007-11-28 14:50:07 -0600
commitb8e558d5784c8054a91dcefd8495b739a664dbae (patch)
tree2e27d3c03275b23740e8bc8ac8f541a18f64574c
parent57879c6d6c51918b8106142e70643b53a9a8c7da (diff)
downloadinitscripts-b8e558d5784c8054a91dcefd8495b739a664dbae.tar.xz
Source /etc/rc.d/functions.d/ for additional initscript functions
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rw-r--r--functions8
-rwxr-xr-xinstall.sh1
-rwxr-xr-xrc.multi2
-rwxr-xr-xrc.single2
-rwxr-xr-xrc.sysinit2
5 files changed, 15 insertions, 0 deletions
diff --git a/functions b/functions
index 8b5ecf1..1cefa0b 100644
--- a/functions
+++ b/functions
@@ -142,5 +142,13 @@ ck_daemon() {
return 0
}
+source_functions() {
+ if [ -d /etc/rc.d/functions.d/ ]; then
+ for f in /etc/rc.d/functions.d/*; do
+ . $f
+ done
+ fi
+}
+
# End of file
# vim: set ts=2 noet:
diff --git a/install.sh b/install.sh
index 6d5b2dc..070289a 100755
--- a/install.sh
+++ b/install.sh
@@ -1,6 +1,7 @@
#!/bin/sh
install -d -m755 ${DESTDIR}/etc/{rc.d,conf.d} || exit 1
+install -d -m755 ${DESTDIR}/etc/rc.d/functions.d/ || exit 1
for i in inittab rc.conf; do
install -D -m644 $i ${DESTDIR}/etc/$i || exit 1
diff --git a/rc.multi b/rc.multi
index 8050e98..678b50e 100755
--- a/rc.multi
+++ b/rc.multi
@@ -6,6 +6,8 @@
. /etc/rc.conf
. /etc/rc.d/functions
+source_functions
+
# Load sysctl variables if sysctl.conf is present
[ -r /etc/sysctl.conf ] && /sbin/sysctl -q -p &>/dev/null
diff --git a/rc.single b/rc.single
index 0d3581b..5f55eeb 100755
--- a/rc.single
+++ b/rc.single
@@ -6,6 +6,8 @@
. /etc/rc.conf
. /etc/rc.d/functions
+source_functions
+
if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
# Shutdown daemons
let i=${#DAEMONS[@]}
diff --git a/rc.sysinit b/rc.sysinit
index bad17d2..3bf8edc 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -6,6 +6,8 @@
. /etc/rc.conf
. /etc/rc.d/functions
+source_functions
+
echo " "
printhl "Arch Linux $C_OTHER(${C_H2}Core Dump$C_OTHER)\n"
printhl "${C_H2}http://www.archlinux.org"