Hint shellcheck where to look for sourced files, if in repository

This will ease running shellcheck from the repository.
This commit is contained in:
Marek Marczykowski-Górecki 2017-09-30 04:56:02 +02:00
parent b42c1880b0
commit aad6fa6d19
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
18 changed files with 30 additions and 0 deletions

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Source Qubes library. # Source Qubes library.
# shellcheck source=init/functions
. /usr/lib/qubes/init/functions . /usr/lib/qubes/init/functions
if ! is_fully_persistent && test -f /etc/xdg/autostart/print-applet.desktop ; then if ! is_fully_persistent && test -f /etc/xdg/autostart/print-applet.desktop ; then

View File

@ -6,9 +6,11 @@
dir=$(dirname "$0") dir=$(dirname "$0")
if [ "$1" = "prepare" ] || [ "$1" = "cleanup" ]; then if [ "$1" = "prepare" ] || [ "$1" = "cleanup" ]; then
# shellcheck disable=SC1090,SC1091
. "$dir/xen-hotplug-common.sh" . "$dir/xen-hotplug-common.sh"
command=$1 command=$1
else else
# shellcheck disable=SC1090,SC1091
. "$dir/block-common.sh" . "$dir/block-common.sh"
fi fi

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Source Qubes library. # Source Qubes library.
# shellcheck source=init/functions
. /usr/lib/qubes/init/functions . /usr/lib/qubes/init/functions
if is_updateable ; then if is_updateable ; then

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Source Qubes library. # Source Qubes library.
# shellcheck source=init/functions
. /usr/lib/qubes/init/functions . /usr/lib/qubes/init/functions
action=$1 action=$1

View File

@ -1,6 +1,7 @@
#!/bin/sh #!/bin/sh
if [ -r /etc/profile.d/qubes-session.sh ]; then if [ -r /etc/profile.d/qubes-session.sh ]; then
# shellcheck disable=SC1091
. /etc/profile.d/qubes-session.sh . /etc/profile.d/qubes-session.sh
fi fi

View File

@ -4,9 +4,11 @@
# description: Executes supplementary Qubes core scripts at VM boot # description: Executes supplementary Qubes core scripts at VM boot
# #
# Source function library. # Source function library.
# shellcheck disable=SC1091
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions
# Source Qubes library. # Source Qubes library.
# shellcheck source=init/functions
. /usr/lib/qubes/init/functions . /usr/lib/qubes/init/functions
start() start()

View File

@ -4,9 +4,11 @@
# description: Executes early necessary Qubes core scripts at VM boot # description: Executes early necessary Qubes core scripts at VM boot
# #
# Source function library. # Source function library.
# shellcheck disable=SC1091
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions
# Source Qubes library. # Source Qubes library.
# shellcheck source=init/functions
. /usr/lib/qubes/init/functions . /usr/lib/qubes/init/functions
start() start()

View File

@ -4,9 +4,11 @@
# description: Executes Qubes core scripts at NetVM boot # description: Executes Qubes core scripts at NetVM boot
# #
# Source function library. # Source function library.
# shellcheck disable=SC1091
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions
# Source Qubes library. # Source Qubes library.
# shellcheck source=init/functions
. /usr/lib/qubes/init/functions . /usr/lib/qubes/init/functions
start() start()

View File

@ -4,9 +4,11 @@
# description: Starts Qubes Firewall monitor # description: Starts Qubes Firewall monitor
# #
# Source function library. # Source function library.
# shellcheck disable=SC1091
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions
# Source Qubes library. # Source Qubes library.
# shellcheck source=init/functions
. /usr/lib/qubes/init/functions . /usr/lib/qubes/init/functions
PIDFILE=/var/run/qubes/qubes-firewall.pid PIDFILE=/var/run/qubes/qubes-firewall.pid

View File

@ -4,9 +4,11 @@
# description: Executes Qubes core scripts at VM boot # description: Executes Qubes core scripts at VM boot
# #
# Source function library. # Source function library.
# shellcheck disable=SC1091
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions
# Source Qubes library. # Source Qubes library.
# shellcheck source=init/functions
. /usr/lib/qubes/init/functions . /usr/lib/qubes/init/functions
start() start()

View File

@ -5,6 +5,7 @@
# #
# Source function library. # Source function library.
# shellcheck disable=SC1091
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions
start() start()

View File

@ -14,12 +14,15 @@
# see PidFile in the configuration file. # see PidFile in the configuration file.
# Source function library. # Source function library.
# shellcheck disable=SC1091
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions
# Source Qubes library. # Source Qubes library.
# shellcheck source=init/functions
. /usr/lib/qubes/init/functions . /usr/lib/qubes/init/functions
# Source networking configuration. # Source networking configuration.
# shellcheck disable=SC1091
. /etc/sysconfig/network . /etc/sysconfig/network
# Check that networking is up. # Check that networking is up.
@ -30,6 +33,7 @@ prog=$(basename $exec)
config="/etc/tinyproxy/tinyproxy-updates.conf" config="/etc/tinyproxy/tinyproxy-updates.conf"
pidfile="/var/run/tinyproxy-updates/tinyproxy.pid" pidfile="/var/run/tinyproxy-updates/tinyproxy.pid"
# shellcheck disable=SC1091
[ -e /etc/sysconfig/tinyproxy-updates ] && . /etc/sysconfig/tinyproxy-updates [ -e /etc/sysconfig/tinyproxy-updates ] && . /etc/sysconfig/tinyproxy-updates
lockfile=/var/lock/subsys/tinyproxy-updates lockfile=/var/lock/subsys/tinyproxy-updates

View File

@ -10,12 +10,15 @@
# #
# Source function library. # Source function library.
# shellcheck disable=SC1091
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions
# Source Qubes library. # Source Qubes library.
# shellcheck source=init/functions
. /usr/lib/qubes/init/functions . /usr/lib/qubes/init/functions
# Source networking configuration. # Source networking configuration.
# shellcheck disable=SC1091
. /etc/sysconfig/network . /etc/sysconfig/network
# Check that networking is up. # Check that networking is up.
@ -25,6 +28,7 @@ exec="/usr/bin/ncat"
prog=$(basename $exec) prog=$(basename $exec)
pidfile="/var/run/qubes-updates-proxy-forwarder.pid" pidfile="/var/run/qubes-updates-proxy-forwarder.pid"
# shellcheck disable=SC1091
[ -e /etc/sysconfig/qubes-updates-proxy-forwarder ] && . /etc/sysconfig/qubes-updates-proxy-forwarder [ -e /etc/sysconfig/qubes-updates-proxy-forwarder ] && . /etc/sysconfig/qubes-updates-proxy-forwarder
lockfile=/var/lock/subsys/qubes-updates-proxy-forwarder lockfile=/var/lock/subsys/qubes-updates-proxy-forwarder

View File

@ -25,6 +25,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Source Qubes library. # Source Qubes library.
# shellcheck source=init/functions
source /usr/lib/qubes/init/functions source /usr/lib/qubes/init/functions
prerequisite() { prerequisite() {

View File

@ -1,6 +1,7 @@
#!/bin/sh #!/bin/sh
# Source Qubes library. # Source Qubes library.
# shellcheck source=init/functions
. /usr/lib/qubes/init/functions . /usr/lib/qubes/init/functions
/usr/lib/qubes/update-proxy-configs /usr/lib/qubes/update-proxy-configs

View File

@ -1,6 +1,7 @@
#!/bin/sh #!/bin/sh
# Source Qubes library. # Source Qubes library.
# shellcheck source=init/functions
. /usr/lib/qubes/init/functions . /usr/lib/qubes/init/functions
set -e set -e

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Source Qubes library. # Source Qubes library.
# shellcheck source=init/functions
. /usr/lib/qubes/init/functions . /usr/lib/qubes/init/functions
set -e set -e

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Source Qubes library. # Source Qubes library.
# shellcheck source=init/functions
. /usr/lib/qubes/init/functions . /usr/lib/qubes/init/functions
# List of services enabled by default (in case of absence of qubesdb entry) # List of services enabled by default (in case of absence of qubesdb entry)