@@ -130,7 +130,8 @@ function user_check () {
130130# run_additional_command [command name] [command to actually execute]
131131run_additional_command () {
132132 if [[ -f " $( type -p " ${1} " 2> /dev/null) " ]]; then
133- ${2}
133+ shift 1
134+ eval " ${@ } "
134135 fi
135136}
136137
@@ -198,7 +199,7 @@ chown root:root -R /etc/sudoers.d/
198199
199200
200201# Configure Plymouth settings
201- if [[ $ boot_splash = true ]]; then
202+ if [[ " ${ boot_splash} " = true ]]; then
202203 # Edit calamares settings for Plymouth.
203204
204205 # Use lightdm-plymouth instead of lightdm.
@@ -217,7 +218,7 @@ if [[ $boot_splash = true ]]; then
217218 sed -i " s/%PLYMOUTH_THEME%/${theme_name} /g" " /etc/plymouth/plymouthd.conf"
218219
219220 # Apply plymouth theme settings.
220- plymouth-set-default-theme ${theme_name}
221+ run_additional_command " plymouth-set-default-theme" " plymouth-set-default-theme ${theme_name} "
221222else
222223 # Delete the configuration file for plymouth.
223224 remove " /usr/share/calamares/modules/services-plymouth.conf"
235236
236237# TUI Installer configs
237238
238- echo ${kernel_filename} > /root/kernel_filename
239+ echo " ${kernel_filename} " > /root/kernel_filename
239240
240241# Calamares configs
241242
@@ -284,7 +285,7 @@ sed -i -r "s/(GRUB_DISTRIBUTOR=).*/\1\"${grub_os_name}\"/g" "/etc/default/grub"
284285
285286# Create new icon cache
286287# This is because alter icon was added by airootfs.
287- run_additional_command " gtk-update-icon-cache" " gtk-update-icon-cache -f /usr/share/icons/hicolor"
288+ run_additional_command " gtk-update-icon-cache -f /usr/share/icons/hicolor"
288289
289290
290291# systemctl helper
0 commit comments