From 855a64bfd54423ac5643cd9e154fc72c42d0131b Mon Sep 17 00:00:00 2001 From: TomasM Date: Sun, 12 Nov 2017 16:37:49 -0500 Subject: [PATCH] fix logout script --- .../03-desktop/rootcopy/usr/bin/fblogout | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/Slax/debian/modules/03-desktop/rootcopy/usr/bin/fblogout b/Slax/debian/modules/03-desktop/rootcopy/usr/bin/fblogout index c0dec92..97c6518 100755 --- a/Slax/debian/modules/03-desktop/rootcopy/usr/bin/fblogout +++ b/Slax/debian/modules/03-desktop/rootcopy/usr/bin/fblogout @@ -1,31 +1,31 @@ #!/bin/bash -exec xlunch --input /etc/xlunch/logout.dsv --noprompt --center --columns 3 --rows 1 \ +COMMAND=$( + xlunch --input /etc/xlunch/logout.dsv --noprompt --center --columns 3 --rows 1 \ --background /usr/share/wallpapers/slax_wallpaper.jpg --font DejaVuSans/11 \ --voidclickterminate --iconpadding 30 --textpadding 10 \ --paddingswap --leastmargin 10 --hidemissing --iconsize 128 \ --highlight /usr/share/icons/hicolor/128x128/apps/xlunch_highlight.png \ - --outputonly | while read LINE; do + --outputonly +) - SND=/usr/share/sounds/shutdown.wav +SND=/usr/share/sounds/shutdown.wav - if [ "$LINE" != "" -a -r $SND ]; then - # blank desktop with smooth effect (if compton still running) - xlunch --noprompt --input /dev/null --bc 111111ff & - # play shutdown sound - aplay $SND - fi +if [ "$COMMAND" != "" -a -r $SND ]; then + # blank desktop with smooth effect (if compton still running) + xlunch --noprompt --input /dev/null --bc 111111ff & + # play shutdown sound + aplay $SND +fi - if [ "$LINE" = "logout" ]; then - killall Xorg - fi +if [ "$COMMAND" = "logout" ]; then + killall Xorg +fi - if [ "$LINE" = "restart" ]; then - reboot - fi +if [ "$COMMAND" = "restart" ]; then + reboot +fi - if [ "$LINE" = "shutdown" ]; then - poweroff - fi - -done +if [ "$COMMAND" = "shutdown" ]; then + poweroff +fi