mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
use same logic in tz as km
This commit is contained in:
parent
7698603004
commit
ebe7d8d9ac
1 changed files with 9 additions and 11 deletions
|
@ -147,15 +147,21 @@ _mainmenu() {
|
||||||
_abort ;;
|
_abort ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
: >/tmp/.tz
|
|
||||||
|
if [[ -e /tmp/.tz-running ]]; then
|
||||||
|
echo "tz already runs on a different console!"
|
||||||
|
echo "Please remove /tmp/.tz-running first to launch tz!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
: >/tmp/.tz-running
|
||||||
if [[ "${1}" = "--setup" ]]; then
|
if [[ "${1}" = "--setup" ]]; then
|
||||||
if ! _dotimezone; then
|
if ! _dotimezone; then
|
||||||
[[ -e /tmp/.km-running ]] && rm /tmp/.km-running
|
[[ -e /tmp/.tz-running ]] && rm /tmp/.tz-running
|
||||||
clear
|
clear
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if ! _dotimeset; then
|
if ! _dotimeset; then
|
||||||
[[ -e /tmp/.km-running ]] && rm /tmp/.km-running
|
[[ -e /tmp/.tz-running ]] && rm /tmp/.tz-running
|
||||||
clear
|
clear
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -163,17 +169,9 @@ if [[ "${1}" = "--setup" ]]; then
|
||||||
else
|
else
|
||||||
_EXIT="Exit"
|
_EXIT="Exit"
|
||||||
fi
|
fi
|
||||||
if [[ -e /tmp/.tz-running ]]; then
|
|
||||||
echo "tz already runs on a different console!"
|
|
||||||
echo "Please remove /tmp/.tz-running first to launch tz!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
: >/tmp/.tz-running
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
_mainmenu
|
_mainmenu
|
||||||
done
|
done
|
||||||
|
|
||||||
clear
|
clear
|
||||||
exit 0
|
exit 0
|
||||||
# vim: set ts=4 sw=4 et:
|
# vim: set ts=4 sw=4 et:
|
||||||
|
|
Loading…
Reference in a new issue