wok-6.x annotate karmen/stuff/karmen-conf @ rev 16951
Up musl-libc (1.0.3) CVE-2014-3483
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Jul 27 13:34:02 2014 +0200 (2014-07-27) |
parents | 08943259e85e |
children |
rev | line source |
---|---|
pankso@2894 | 1 #!/bin/sh |
pankso@2894 | 2 # |
pankso@2894 | 3 # |
pankso@2894 | 4 : ${DIALOG=dialog} |
pankso@2894 | 5 |
pankso@2894 | 6 CONFIG_DIR="$HOME/.config/karmen" |
pankso@2894 | 7 |
pankso@2894 | 8 # Dialog menu. |
pankso@2894 | 9 exec 3>&1 |
pankso@2894 | 10 value=`$DIALOG --clear \ |
pankso@2894 | 11 --title " Karmen settings " \ |
pankso@2894 | 12 --menu "" 15 70 5 \ |
pankso@2894 | 13 "autostart" "Autostarted applications" \ |
pankso@12408 | 14 "exitwm" "Exit Karmen session" \ |
pankso@12408 | 15 "reboot" "Reboot system" \ |
pankso@12408 | 16 "quit" "Quit Karmen configuration" \ |
pankso@2894 | 17 2>&1 1>&3` |
pankso@2894 | 18 retval=$? |
pankso@2894 | 19 exec 3>&- |
pankso@12408 | 20 |
pankso@2894 | 21 case $retval in |
pankso@12408 | 22 0) continue ;; |
pankso@12408 | 23 1) echo "Cancel pressed." && exit 0 ;; |
pankso@2894 | 24 255) |
pankso@2894 | 25 if test -n "$value"; then |
pankso@2894 | 26 echo "$value" |
pankso@2894 | 27 else |
pankso@12408 | 28 echo "ESC pressed." && exit 0 |
pankso@2894 | 29 fi ;; |
pankso@2894 | 30 esac |
pankso@2894 | 31 |
pankso@2894 | 32 case $value in |
pankso@2894 | 33 autostart) |
pankso@2894 | 34 nano $CONFIG_DIR/autostart.sh |
pankso@12408 | 35 exec $(basename $0) ;; |
pankso@12408 | 36 exitwm) killall karmen ;; |
pankso@12408 | 37 reboot) reboot || reboot -f ;; |
pankso@12408 | 38 quit) continue ;; |
pankso@2894 | 39 esac |
pankso@2894 | 40 |
pankso@2894 | 41 exit 0 |
pankso@2894 | 42 |