]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(gensplash): shellcheck for modules.d/50gensplash
authorHarald Hoyer <harald@redhat.com>
Fri, 26 Mar 2021 09:29:16 +0000 (10:29 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Mon, 29 Mar 2021 08:41:38 +0000 (10:41 +0200)
modules.d/50gensplash/.shchkdir [new file with mode: 0644]
modules.d/50gensplash/gensplash-emergency.sh
modules.d/50gensplash/gensplash-newroot.sh
modules.d/50gensplash/gensplash-pretrigger.sh
modules.d/50gensplash/module-setup.sh

diff --git a/modules.d/50gensplash/.shchkdir b/modules.d/50gensplash/.shchkdir
new file mode 100644 (file)
index 0000000..e69de29
index 01e639b3bf6cc79ded048df7eaf7e5492319ca0e..f21d54af01812723b5c6cf53fc8bc448d2ec633f 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/sh
 
+# shellcheck disable=SC2034
 CDROOT=0
 . /lib/gensplash-lib.sh
 splash verbose
index ed2d421fd0d316b0b3fb34f5f9cacc83824ec848..445e91cb813774780dad3edc2050c32335eceb62 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/sh
 
+# shellcheck disable=SC2034
 CDROOT=0
 . /lib/gensplash-lib.sh
 splash set_msg 'Switching to new root'
index e7c9541208def5af910452655bdfdcd17326449f..038c10bc2eab6610eb767a228c86d4c444cb46b0 100755 (executable)
@@ -4,6 +4,7 @@ if getargbool 1 rd.splash -d -n rd_NO_SPLASH; then
     info "Starting Gentoo Splash"
 
     [ -x /lib/udev/console_init ] && /lib/udev/console_init /dev/tty0
+    # shellcheck disable=SC2034
     CDROOT=0
     . /lib/gensplash-lib.sh
     splash init
index ee7b64128098230ce0dafd8ed38fd74b4b085703..bb91d13f5e97252eecdea05720724f312972fa58 100755 (executable)
@@ -52,6 +52,7 @@ install() {
         _splash_res=${DRACUT_GENSPLASH_RES}
     elif [[ ${hostonly} ]]; then
         # Settings from config only in hostonly
+        # shellcheck disable=SC1090
         [[ -e $dracutsysrootdir/etc/conf.d/splash ]] && source "$dracutsysrootdir"/etc/conf.d/splash
         [[ ! ${_splash_theme} ]] && _splash_theme=default
         [[ ${_splash_res} ]] && _opts+=" -r ${_splash_res}"
@@ -62,15 +63,15 @@ install() {
 
     dinfo "Installing Gentoo Splash (using the ${_splash_theme} theme)"
 
-    pushd "${initdir}" > /dev/null
+    pushd "${initdir}" > /dev/null || exit
     mv dev dev.old
-    call_splash_geninitramfs "${initdir}" ${_opts} ${_splash_theme} || {
+    call_splash_geninitramfs "${initdir}" "${_opts}" ${_splash_theme} || {
         derror "Could not build splash"
         return 1
     }
     rm -rf dev
     mv dev.old dev
-    popd > /dev/null
+    popd > /dev/null || exit
 
     inst_multiple chvt
     inst /usr/share/splashutils/initrd.splash /lib/gensplash-lib.sh