Skip to content

Commit f5d60ea

Browse files
committed
fix
1 parent 1fab149 commit f5d60ea

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

usr/libexec/helper-scripts/set-keyboard-layout.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,12 @@ set_labwc_keymap() {
349349
fi
350350

351351
if [ "${no_reload}" = 'false' ]; then
352-
if ischroot --default-false; then
352+
if [ "${do_update_grub}" = 'false' ]; then
353+
printf '%s\n' "${FUNCNAME[0]}: INFO: Skipping command 'labwc --reconfigure' due to '--no-update-grub' option."
354+
elif ischroot --default-false; then
353355
printf '%s\n' "${FUNCNAME[0]}: INFO: Skipping executing 'labwc --reconfigure' inside chroot, ok."
356+
elif [ "$(id --user)" = 0 ]; then
357+
printf '%s\n' "${FUNCNAME[0]}: INFO: Skipping executing 'labwc --reconfigure' because running as root, ok."
354358
elif pgrep -- labwc >/dev/null; then
355359
## 'labwc' is running. So the user most likely wishes the change to instantly apply.
356360
## Therefore let's run 'labwc --reconfigure'.

0 commit comments

Comments
 (0)