mariadb: Add shellcheck disable into init script
On few places, shellcheck gets confused by how some OpenWrt functions work - especially load ones. Also on few places there are $options variables that need not to be globbed. Could be rewritten better not to need them, but I'll do major rewrites later in separate pull request. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
This commit is contained in:
parent
bb6e0d799c
commit
c35bd3aa8e
1 changed files with 5 additions and 1 deletions
|
@ -1,7 +1,9 @@
|
||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2010-2018 OpenWrt.org
|
# Copyright (C) 2010-2018 OpenWrt.org
|
||||||
|
|
||||||
|
# shellcheck disable=SC2034
|
||||||
START=95
|
START=95
|
||||||
|
# shellcheck disable=SC2034
|
||||||
STOP=10
|
STOP=10
|
||||||
|
|
||||||
NAME=mysqld
|
NAME=mysqld
|
||||||
|
@ -78,6 +80,7 @@ start() {
|
||||||
config_load "$NAME"
|
config_load "$NAME"
|
||||||
|
|
||||||
config_get_bool enabled general enabled 0
|
config_get_bool enabled general enabled 0
|
||||||
|
# shellcheck disable=SC2154
|
||||||
if [ "$enabled" -eq 0 ]; then
|
if [ "$enabled" -eq 0 ]; then
|
||||||
$LOGGER "service not enabled in /etc/config/$NAME"
|
$LOGGER "service not enabled in /etc/config/$NAME"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -123,11 +126,12 @@ start() {
|
||||||
if [ "$i" = "$rundir" ]; then
|
if [ "$i" = "$rundir" ]; then
|
||||||
opts=
|
opts=
|
||||||
fi
|
fi
|
||||||
|
# shellcheck disable=SC2086
|
||||||
mkdir -p $opts "$i"
|
mkdir -p $opts "$i"
|
||||||
[ -d "$i" ] && chown mariadb:mariadb "$i"
|
[ -d "$i" ] && chown mariadb:mariadb "$i"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
# shellcheck disable=SC2154,SC2086
|
||||||
"$MYSQLDSAFE" $options >/dev/null 2>&1 &
|
"$MYSQLDSAFE" $options >/dev/null 2>&1 &
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue