File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
pkg/cidata/cidata.TEMPLATE.d/boot Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
22set -eux
33
4- # openSUSE Tumbleweed uses /etc/ssh/sshd_config.d, not /etc/ssh/sshd_config
5- # TODO: support /etc/ssh/sshd_config.d
6- if [ ! -e /etc/ssh/sshd_config ]; then
7- exit 0
8- fi
4+ if [ -d /etc/ssh/sshd_config.d ]; then
5+ if [ -e /etc/ssh/sshd_config.d/10-acceptenv-colorterm.conf ]; then
6+ exit 0
7+ fi
8+
9+ # accept any incoming COLORTERM environment variable
10+ echo " AcceptEnv COLORTERM" > /etc/ssh/sshd_config.d/10-acceptenv-colorterm.conf
11+ elif [ -e /etc/ssh/sshd_config ]; then
12+ if grep -q " COLORTERM" /etc/ssh/sshd_config; then
13+ exit 0
14+ fi
915
10- if grep -q " COLORTERM" /etc/ssh/sshd_config; then
16+ # accept any incoming COLORTERM environment variable
17+ sed -i ' s/^AcceptEnv LANG LC_\*$/AcceptEnv COLORTERM LANG LC_*/' /etc/ssh/sshd_config
18+ else
1119 exit 0
1220fi
1321
14- # accept any incoming COLORTERM environment variable
15- sed -i ' s/^AcceptEnv LANG LC_\*$/AcceptEnv COLORTERM LANG LC_*/' /etc/ssh/sshd_config
1622if [ -f /sbin/openrc-run ]; then
1723 rc-service --ifstarted sshd reload
1824elif command -v systemctl > /dev/null 2>&1 ; then
You can’t perform that action at this time.
0 commit comments