_dirs+=" /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/plymouth"
fi
for _dir in $_dirs; do
- if [ -x $dracutsysrootdir$_dir/plymouth-populate-initrd ]; then
- echo $_dir
+ if [ -x "$dracutsysrootdir""$_dir"/plymouth-populate-initrd ]; then
+ echo "$_dir"
return
fi
done
# called by dracut
check() {
[[ "$mount_needs" ]] && return 1
- [ -z $(pkglib_dir) ] && return 1
+ [[ $(pkglib_dir) ]] || return 1
require_binaries plymouthd plymouth plymouth-set-default-theme
}
# called by dracut
install() {
PKGLIBDIR=$(pkglib_dir)
- if grep -q nash $dracutsysrootdir${PKGLIBDIR}/plymouth-populate-initrd \
- || [ ! -x $dracutsysrootdir${PKGLIBDIR}/plymouth-populate-initrd ]; then
+ if grep -q nash "$dracutsysrootdir""${PKGLIBDIR}"/plymouth-populate-initrd \
+ || [ ! -x "$dracutsysrootdir""${PKGLIBDIR}"/plymouth-populate-initrd ]; then
+ # shellcheck disable=SC1090
. "$moddir"/plymouth-populate-initrd.sh
else
PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="$dracutfunctions" \
- $dracutsysrootdir${PKGLIBDIR}/plymouth-populate-initrd -t "$initdir"
+ "$dracutsysrootdir""${PKGLIBDIR}"/plymouth-populate-initrd -t "$initdir"
fi
inst_hook emergency 50 "$moddir"/plymouth-emergency.sh
#!/bin/sh
if type plymouth > /dev/null 2>&1 && [ -z "$DRACUT_SYSTEMD" ]; then
- plymouth --newroot=$NEWROOT
+ plymouth --newroot="$NEWROOT"
fi
test -e "${PLYMOUTH_LOGO_FILE}" && inst_simple "${PLYMOUTH_LOGO_FILE}"
+# shellcheck disable=SC2174
mkdir -m 0755 -p "${initdir}/usr/share/plymouth"
inst_libdir_file "plymouth/text.so" "plymouth/details.so"
if [[ -d $dracutsysrootdir/usr/share/plymouth/themes/${PLYMOUTH_THEME} ]]; then
for x in "/usr/share/plymouth/themes/${PLYMOUTH_THEME}"/*; do
[[ -f "$dracutsysrootdir$x" ]] || break
- inst $x
+ inst "$x"
done
fi
if [[ -L $dracutsysrootdir/usr/share/plymouth/themes/default.plymouth ]]; then
inst /usr/share/plymouth/themes/default.plymouth
# Install plugin for this theme
- PLYMOUTH_PLUGIN=$(grep "^ModuleName=" "$dracutsysrootdir"/usr/share/plymouth/themes/default.plymouth | while read a b c || [ -n "$b" ]; do echo $b; done)
+ PLYMOUTH_PLUGIN=$(grep "^ModuleName=" "$dracutsysrootdir"/usr/share/plymouth/themes/default.plymouth | while read -r _ b _ || [ -n "$b" ]; do echo "$b"; done)
inst_libdir_file "plymouth/${PLYMOUTH_PLUGIN}.so"
fi
else
for x in "$dracutsysrootdir"/usr/share/plymouth/themes/{text,details}/*; do
[[ -f $x ]] || continue
THEME_DIR=$(dirname "${x#$dracutsysrootdir}")
+ # shellcheck disable=SC2174
mkdir -m 0755 -p "${initdir}/$THEME_DIR"
inst_multiple "${x#$dracutsysrootdir}"
done
(
- cd ${initdir}/usr/share/plymouth/themes
+ cd "${initdir}"/usr/share/plymouth/themes || exit
ln -s text/text.plymouth default.plymouth 2>&1
)
fi
info "Starting plymouth daemon"
mkdir -m 0755 /run/plymouth
- read consoledev rest < /sys/class/tty/console/active
+ read -r consoledev rest < /sys/class/tty/console/active
consoledev=${consoledev:-tty0}
[ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev"
plymouthd --attach-to-session --pid-file /run/plymouth/pid