kisslinux / init

KISS Linux - Init Framework
https://kisslinux.github.io
MIT License
90 stars 26 forks source link

bug: run_hooks() does not pass arguments to hook scripts #7

Closed a-schaefers closed 4 years ago

a-schaefers commented 4 years ago

run hooks as it is currently,

run_hooks() {
    [ -f "$1" ] && for file in "$@"; do
        [ -f "$file" ] && . "$file"
    done
}

Does not pass arguments to the hooks that it sources. This breaks sinit and is also confusing.

originally discovered by @cemkeylan (Thanks)