aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2024-03-04 17:07:10 +0100
committerCem Keylan <cem@ckyln.com>2024-03-04 17:20:25 +0100
commit6af10959fe35716fee32418dae8ea92bd8457ee6 (patch)
tree3b3290ec3b897bd6236875fbabdb79dc837d1e1a
parent41fb9de64c913293b59aa257aec6df4cf4c3206c (diff)
downloadinit-master.tar.gz
hooks: add hook directory for simplifying usageHEADmaster
-rw-r--r--rc.lib3
1 files changed, 2 insertions, 1 deletions
diff --git a/rc.lib b/rc.lib
index 183f6a2..6ec5252 100644
--- a/rc.lib
+++ b/rc.lib
@@ -138,7 +138,8 @@ random() {
run_hook() {
out "Running '$1' hooks..."
- for hook in "/etc/init/"*".$1" "/usr/lib/init/hooks/"*".$1"; do
+ for hook in "/etc/init/"*".$1" "/usr/lib/init/hooks/"*".$1" \
+ "/etc/init/$1/"* "/usr/lib/init/hooks/$1/"*; do
[ -f "$hook" ] || continue
out "Running '$hook'..."
. "$hook"