cdm: add POSIX SH compat patch (#246)

This commit is contained in:
maxice8 2018-06-22 18:54:22 -03:00 committed by Andrea Brancaleoni
parent 0e9cc92c74
commit c984fcfc86
2 changed files with 19 additions and 1 deletions

View file

@ -0,0 +1,18 @@
Source: maxice8
Upstream: to be upstreamed
Reason: fixes running it with POSIX shells
--- src/profile.sh
+++ src/profile.sh
@@ -1,8 +1,8 @@
# To avoid potential situation where cdm(1) crashes on every TTY, here we
# default to execute cdm(1) on tty1 only, and leave other TTYs untouched.
-if [[ "$(tty)" == '/dev/tty1' ]]; then
- [[ -n "$CDM_SPAWN" ]] && return
+if [ "$(tty)" = '/dev/tty1' ]; then
+ [ -n "$CDM_SPAWN" ] && return
# Avoid executing cdm(1) when X11 has already been started.
- [[ -z "$DISPLAY$SSH_TTY$(pgrep xinit)" ]] && exec cdm
+ [ -z "$DISPLAY$SSH_TTY$(pgrep xinit)" ] && exec cdm
fi

View file

@ -1,7 +1,7 @@
# Template file for 'cdm'
pkgname=cdm
version=0.7
revision=1
revision=2
short_desc="Console Display Manager"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
depends="dialog xinit kbd xdpyinfo"