diff --git a/srcpkgs/cdm/patches/fix-bashisms.patch b/srcpkgs/cdm/patches/fix-bashisms.patch new file mode 100644 index 00000000000..a81f665c948 --- /dev/null +++ b/srcpkgs/cdm/patches/fix-bashisms.patch @@ -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 + diff --git a/srcpkgs/cdm/template b/srcpkgs/cdm/template index 6caa024c47b..5d409f36376 100644 --- a/srcpkgs/cdm/template +++ b/srcpkgs/cdm/template @@ -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 " depends="dialog xinit kbd xdpyinfo"