Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
init: Remove run_hooks(). Fixes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanaraps committed Jan 13, 2020
1 parent 254f7aa commit b6831fb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 3 additions & 1 deletion lib/init/rc.boot
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ log "Loading sysctl settings..."; {
}

log "Running rc.d hooks..."; {
run_hooks /etc/rc.d/*.boot
for file in /etc/rc.d/*.boot; do
[ -f "$file" ] && . "$file"
done
}

command -v udevd >/dev/null &&
Expand Down
6 changes: 0 additions & 6 deletions lib/init/rc.lib
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,3 @@ killall5_sh() {

kill -s SIGCONT -1
}

run_hooks() {
[ -f "$1" ] && for file in "$@"; do
[ -f "$file" ] && . "$file"
done
}
8 changes: 6 additions & 2 deletions lib/init/rc.shutdown
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ log "Loading rc.conf settings..."; {
}

log "Running shutdown pre hooks..."; {
run_hooks /etc/rc.d/*.pre.shutdown
for file in /etc/rc.d/*.pre.shutdown; do
[ -f "$file" ] && . "$file"
done
}

log "Waiting for services to stop..."; {
Expand Down Expand Up @@ -50,5 +52,7 @@ log "Deactivating dmcrypt devices (if any exist)."; {
}

log "Running shutdown post hooks..."; {
run_hooks /etc/rc.d/*.post.shutdown
for file in /etc/rc.d/*.post.shutdown; do
[ -f "$file" ] && . "$file"
done
}

0 comments on commit b6831fb

Please sign in to comment.