Benjamin Drung f277309e0b Fix (nearly) all issues found by shellcheck
shellcheck found more issues than SC1074. Address most of these issues.
You can check the shell code by running:

```
shellcheck -e SC1090,SC1091 -s dash hook-functions $(find * -type f
\( -executable ! -name rules -o -regex '.*\.\(post\|pre\).*'
-o -regex "^\(docs\|scripts\)/.*" ! -name '*.md' \))
```

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
2018-12-18 13:30:15 +01:00

26 lines
296 B
Bash
Executable File

#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
# get pre-requisites
prereqs)
prereqs
exit 0
;;
esac
# sanity check
[ -z "${blacklist?}" ] && exit 0
# write blacklist to modprobe.d
IFS=','
for b in ${blacklist}; do
echo "blacklist $b" >> /etc/modprobe.d/initramfs.conf
done