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 1
1
#! /bin/sh
2
2
set -eux
3
3
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
9
15
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
11
19
exit 0
12
20
fi
13
21
14
- # accept any incoming COLORTERM environment variable
15
- sed -i ' s/^AcceptEnv LANG LC_\*$/AcceptEnv COLORTERM LANG LC_*/' /etc/ssh/sshd_config
16
22
if [ -f /sbin/openrc-run ]; then
17
23
rc-service --ifstarted sshd reload
18
24
elif command -v systemctl > /dev/null 2>&1 ; then
You can’t perform that action at this time.
0 commit comments