mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Merge remote-tracking branch 'remotes/origin/dev' into issue/1049
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
{%- set ESCLUSTERNAME = salt['pillar.get']('elasticsearch:esclustername', '') %}
|
||||
{%- endif %}
|
||||
{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
cluster.name: "{{ ESCLUSTERNAME }}"
|
||||
network.host: 0.0.0.0
|
||||
|
||||
@@ -16,12 +17,30 @@ discovery.zen.minimum_master_nodes: 1
|
||||
path.logs: /var/log/elasticsearch
|
||||
action.destructive_requires_name: true
|
||||
transport.bind_host: 0.0.0.0
|
||||
transport.publish_host: {{ NODEIP }}
|
||||
transport.publish_host: {{ grains.host }}
|
||||
transport.publish_port: 9300
|
||||
cluster.routing.allocation.disk.threshold_enabled: true
|
||||
cluster.routing.allocation.disk.watermark.low: 95%
|
||||
cluster.routing.allocation.disk.watermark.high: 98%
|
||||
cluster.routing.allocation.disk.watermark.flood_stage: 98%
|
||||
{%- if FEATURES is sameas true %}
|
||||
xpack.security.enabled: false
|
||||
xpack.security.http.ssl.enabled: false
|
||||
xpack.security.transport.ssl.enabled: false
|
||||
xpack.security.http.ssl.key: /usr/share/elasticsearch/config/elasticsearch.key
|
||||
xpack.security.http.ssl.certificate: /usr/share/elasticsearch/config/elasticsearch.crt
|
||||
xpack.security.http.ssl.certificate_authorities: /usr/share/elasticsearch/config/ca.crt
|
||||
xpack.security.transport.ssl.key: /usr/share/elasticsearch/config/elasticsearch.key
|
||||
xpack.security.transport.ssl.certificate: /usr/share/elasticsearch/config/elasticsearch.crt
|
||||
xpack.security.transport.ssl.certificate_authorities: /usr/share/elasticsearch/config/ca.crt
|
||||
#xpack.security.transport.ssl.verification_mode: none
|
||||
#xpack.security.http.ssl.client_authentication: none
|
||||
#xpack.security.authc:
|
||||
# anonymous:
|
||||
# username: anonymous_user
|
||||
# roles: superuser
|
||||
# authz_exception: true
|
||||
{%- endif %}
|
||||
node.attr.box_type: {{ NODE_ROUTE_TYPE }}
|
||||
node.name: {{ ESCLUSTERNAME }}
|
||||
script.max_compilations_rate: 1000/1m
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
. /usr/sbin/so-common
|
||||
# Check to see if we have extracted the ca cert.
|
||||
if [ ! -f /opt/so/saltstack/local/salt/common/cacerts ]; then
|
||||
docker run -v /etc/pki/ca.crt:/etc/pki/ca.crt --name so-elasticsearchca --user root --entrypoint keytool {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-logstash:{{ VERSION }} -keystore /etc/pki/ca-trust/extracted/java/cacerts -alias SOSCA -import -file /etc/pki/ca.crt -storepass changeit -noprompt
|
||||
docker run -v /etc/pki/ca.crt:/etc/pki/ca.crt --name so-elasticsearchca --user root --entrypoint jdk/bin/keytool {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-elasticsearch:{{ VERSION }} -keystore /etc/pki/ca-trust/extracted/java/cacerts -alias SOSCA -import -file /etc/pki/ca.crt -storepass changeit -noprompt
|
||||
docker cp so-elasticsearchca:/etc/pki/ca-trust/extracted/java/cacerts /opt/so/saltstack/local/salt/common/cacerts
|
||||
docker cp so-elasticsearchca:/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /opt/so/saltstack/local/salt/common/tls-ca-bundle.pem
|
||||
docker rm so-elasticsearchca
|
||||
|
||||
12
salt/elasticsearch/files/sotls.yaml
Normal file
12
salt/elasticsearch/files/sotls.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
keystore.path: /usr/share/elasticsearch/config/sokeys
|
||||
keystore.password: changeit
|
||||
keystore.algorithm: SunX509
|
||||
truststore.path: /etc/pki/ca-trust/extracted/java/cacerts
|
||||
truststore.password: changeit
|
||||
truststore.algorithm: PKIX
|
||||
protocols:
|
||||
- TLSv1.2
|
||||
ciphers:
|
||||
- TLS_RSA_WITH_AES_128_CBC_SHA256
|
||||
transport.encrypted: true
|
||||
http.encrypted: false
|
||||
@@ -16,11 +16,13 @@
|
||||
{% set IMAGEREPO = salt['pillar.get']('global:imagerepo') %}
|
||||
{% set MANAGER = salt['grains.get']('master') %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%}
|
||||
|
||||
{% if FEATURES %}
|
||||
{% set FEATURES = "-features" %}
|
||||
|
||||
{%- if FEATURES is sameas true %}
|
||||
{% set FEATUREZ = "-features" %}
|
||||
{% else %}
|
||||
{% set FEATURES = '' %}
|
||||
{% set FEATUREZ = '' %}
|
||||
{% endif %}
|
||||
|
||||
{% if grains['role'] in ['so-eval','so-managersearch', 'so-manager', 'so-standalone', 'so-import'] %}
|
||||
@@ -137,6 +139,13 @@ esyml:
|
||||
- group: 939
|
||||
- template: jinja
|
||||
|
||||
sotls:
|
||||
file.managed:
|
||||
- name: /opt/so/conf/elasticsearch/sotls.yml
|
||||
- source: salt://elasticsearch/files/sotls.yml
|
||||
- user: 930
|
||||
- group: 939
|
||||
|
||||
#sync templates to /opt/so/conf/elasticsearch/templates
|
||||
{% for TEMPLATE in TEMPLATES %}
|
||||
es_template_{{TEMPLATE.split('.')[0] | replace("/","_") }}:
|
||||
@@ -168,18 +177,23 @@ eslogdir:
|
||||
|
||||
so-elasticsearch:
|
||||
docker_container.running:
|
||||
- image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-elasticsearch:{{ VERSION }}{{ FEATURES }}
|
||||
- image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-elasticsearch:{{ VERSION }}{{ FEATUREZ }}
|
||||
- hostname: elasticsearch
|
||||
- name: so-elasticsearch
|
||||
- user: elasticsearch
|
||||
- extra_hosts:
|
||||
- {{ grains.host }}:{{ NODEIP }}
|
||||
{%- if ismanager %}
|
||||
{%- if salt['pillar.get']('nodestab', {}) %}
|
||||
{%- for SN, SNDATA in salt['pillar.get']('nodestab', {}).items() %}
|
||||
- {{ SN.split('_')|first }}:{{ SNDATA.ip }}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
- environment:
|
||||
- discovery.type=single-node
|
||||
#- bootstrap.memory_lock=true
|
||||
#- cluster.name={{ esclustername }}
|
||||
- ES_JAVA_OPTS=-Xms{{ esheap }} -Xmx{{ esheap }}
|
||||
#- http.host=0.0.0.0
|
||||
#- transport.host=127.0.0.1
|
||||
- ulimits:
|
||||
ulimits:
|
||||
- memlock=-1:-1
|
||||
- nofile=65536:65536
|
||||
- nproc=4096
|
||||
@@ -192,6 +206,10 @@ so-elasticsearch:
|
||||
- /nsm/elasticsearch:/usr/share/elasticsearch/data:rw
|
||||
- /opt/so/log/elasticsearch:/var/log/elasticsearch:rw
|
||||
- /opt/so/conf/ca/cacerts:/etc/pki/ca-trust/extracted/java/cacerts:ro
|
||||
- /etc/pki/ca.crt:/usr/share/elasticsearch/config/ca.crt:ro
|
||||
- /etc/pki/elasticsearch.p12:/usr/share/elasticsearch/config/elasticsearch.p12:ro
|
||||
- /opt/so/conf/elasticsearch/sotls.yml:/usr/share/elasticsearch/config/sotls.yml:ro
|
||||
|
||||
- watch:
|
||||
- file: cacertz
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
{% set MANAGER = salt['grains.get']('master') %}
|
||||
{% set MANAGERIP = salt['pillar.get']('global:managerip', '') %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
{% if FEATURES %}
|
||||
{%- if FEATURES is sameas true %}
|
||||
{% set FEATURES = "-features" %}
|
||||
{% else %}
|
||||
{% set FEATURES = '' %}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
# Default Kibana configuration from kibana-docker.
|
||||
{%- set ES = salt['pillar.get']('manager:mainip', '') -%}
|
||||
{%- set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
server.name: kibana
|
||||
server.host: "0"
|
||||
server.basePath: /kibana
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{% set IMAGEREPO = salt['pillar.get']('global:imagerepo') %}
|
||||
{% set MANAGER = salt['grains.get']('master') %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
{% if FEATURES %}
|
||||
{%- if FEATURES is sameas true %}
|
||||
{% set FEATURES = "-features" %}
|
||||
{% else %}
|
||||
{% set FEATURES = '' %}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
{% set MANAGER = salt['grains.get']('master') %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
|
||||
{% if FEATURES %}
|
||||
{%- if FEATURES is sameas true %}
|
||||
{% set FEATURES = "-features" %}
|
||||
{% else %}
|
||||
{% set FEATURES = '' %}
|
||||
@@ -167,7 +167,8 @@ so-logstash:
|
||||
- /etc/pki/filebeat.p8:/usr/share/logstash/filebeat.key:ro
|
||||
- /etc/pki/ca.crt:/usr/share/filebeat/ca.crt:ro
|
||||
- /opt/so/conf/ca/cacerts:/etc/pki/ca-trust/extracted/java/cacerts:ro
|
||||
- /opt/so/conf/ca/tls-ca-bundle.pem:/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
|
||||
- /opt/so/conf/ca/tls-ca-bundle.pem:/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem:ro
|
||||
- /etc/pki/ca.cer:/ca/ca.crt:ro
|
||||
{%- if grains['role'] == 'so-eval' %}
|
||||
- /nsm/zeek:/nsm/zeek:ro
|
||||
- /nsm/suricata:/suricata:ro
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
{%- else %}
|
||||
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
|
||||
{%- endif %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
output {
|
||||
if [module] =~ "zeek" and "import" not in [tags] {
|
||||
elasticsearch {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
{%- else %}
|
||||
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
|
||||
{%- endif %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
output {
|
||||
if "import" in [tags] {
|
||||
elasticsearch {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
{%- else %}
|
||||
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
|
||||
{%- endif %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
output {
|
||||
if [event_type] == "sflow" {
|
||||
elasticsearch {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
{%- else %}
|
||||
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
|
||||
{%- endif %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
output {
|
||||
if [event_type] == "ids" and "import" not in [tags] {
|
||||
elasticsearch {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
{%- else %}
|
||||
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
|
||||
{%- endif %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
output {
|
||||
if [module] =~ "syslog" {
|
||||
elasticsearch {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
{%- else %}
|
||||
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
|
||||
{%- endif %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
output {
|
||||
if [module] =~ "osquery" {
|
||||
elasticsearch {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
{%- else %}
|
||||
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
|
||||
{%- endif %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
output {
|
||||
if "firewall" in [tags] {
|
||||
elasticsearch {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
{%- else %}
|
||||
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
|
||||
{%- endif %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
output {
|
||||
if [module] =~ "suricata" and "import" not in [tags] {
|
||||
elasticsearch {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
{%- else %}
|
||||
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
|
||||
{%- endif %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
output {
|
||||
if "beat-ext" in [tags] and "import" not in [tags] {
|
||||
elasticsearch {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
{%- else %}
|
||||
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
|
||||
{%- endif %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
output {
|
||||
if [module] =~ "ossec" {
|
||||
elasticsearch {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
{%- else %}
|
||||
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
|
||||
{%- endif %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
output {
|
||||
if [module] =~ "strelka" {
|
||||
elasticsearch {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{%- set MANAGERIP = salt['pillar.get']('global:managerip', '') -%}
|
||||
{%- set SENSORONIKEY = salt['pillar.get']('global:sensoronikey', '') -%}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
{
|
||||
"logFilename": "/opt/sensoroni/logs/sensoroni-server.log",
|
||||
"server": {
|
||||
|
||||
@@ -194,7 +194,7 @@ regkeyperms:
|
||||
- x509: /etc/pki/minio.crt
|
||||
{%- endif %}
|
||||
|
||||
# Create a cert for the docker registry
|
||||
# Create a cert for minio
|
||||
/etc/pki/minio.crt:
|
||||
x509.certificate_managed:
|
||||
- ca_server: {{ ca_server }}
|
||||
@@ -216,6 +216,46 @@ miniokeyperms:
|
||||
- mode: 640
|
||||
- group: 939
|
||||
|
||||
# Create a cert for elasticsearch
|
||||
/etc/pki/elasticsearch.key:
|
||||
x509.private_key_managed:
|
||||
- CN: {{ manager }}
|
||||
- bits: 4096
|
||||
- days_remaining: 0
|
||||
- days_valid: 820
|
||||
- backup: True
|
||||
- new: True
|
||||
{% if salt['file.file_exists']('/etc/pki/elasticsearch.key') -%}
|
||||
- prereq:
|
||||
- x509: /etc/pki/elasticsearch.crt
|
||||
{%- endif %}
|
||||
|
||||
/etc/pki/elasticsearch.crt:
|
||||
x509.certificate_managed:
|
||||
- ca_server: {{ ca_server }}
|
||||
- signing_policy: registry
|
||||
- public_key: /etc/pki/elasticsearch.key
|
||||
- CN: {{ manager }}
|
||||
- days_remaining: 0
|
||||
- days_valid: 820
|
||||
- backup: True
|
||||
- unless:
|
||||
# https://github.com/saltstack/salt/issues/52167
|
||||
# Will trigger 5 days (432000 sec) from cert expiration
|
||||
- 'enddate=$(date -d "$(openssl x509 -in /etc/pki/elasticsearch.crt -enddate -noout | cut -d= -f2)" +%s) ; now=$(date +%s) ; expire_date=$(( now + 432000)); [ $enddate -gt $expire_date ]'
|
||||
cmd.run:
|
||||
- name: "/usr/bin/openssl pkcs12 -inkey /etc/pki/elasticsearch.key -in /etc/pki/elasticsearch.crt -export -out /etc/pki/elasticsearch.p12 -nodes -passout pass:"
|
||||
- onchanges:
|
||||
- x509: /etc/pki/elasticsearch.key
|
||||
|
||||
ealstickeyperms:
|
||||
file.managed:
|
||||
- replace: False
|
||||
- name: /etc/pki/elasticsearch.key
|
||||
- mode: 640
|
||||
- group: 930
|
||||
|
||||
# Create a cert for Redis encryption
|
||||
/etc/pki/redis.key:
|
||||
x509.private_key_managed:
|
||||
- CN: {{ manager }}
|
||||
@@ -229,7 +269,6 @@ miniokeyperms:
|
||||
- x509: /etc/pki/redis.crt
|
||||
{%- endif %}
|
||||
|
||||
# Create a cert for the docker registry
|
||||
/etc/pki/redis.crt:
|
||||
x509.certificate_managed:
|
||||
- ca_server: {{ ca_server }}
|
||||
@@ -457,4 +496,45 @@ fleetkeyperms:
|
||||
- mode: 640
|
||||
- group: 939
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if grains['role'] in ['so-node', 'so-heavynode'] %}
|
||||
# Create a cert for elasticsearch
|
||||
/etc/pki/elasticsearch.key:
|
||||
x509.private_key_managed:
|
||||
- CN: {{ manager }}
|
||||
- bits: 4096
|
||||
- days_remaining: 0
|
||||
- days_valid: 820
|
||||
- backup: True
|
||||
- new: True
|
||||
{% if salt['file.file_exists']('/etc/pki/elasticsearch.key') -%}
|
||||
- prereq:
|
||||
- x509: /etc/pki/elasticsearch.crt
|
||||
|
||||
/etc/pki/elasticsearch.crt:
|
||||
x509.certificate_managed:
|
||||
- ca_server: {{ ca_server }}
|
||||
- signing_policy: registry
|
||||
- public_key: /etc/pki/elasticsearch.key
|
||||
- CN: {{ HOSTNAME }}
|
||||
- days_remaining: 0
|
||||
- days_valid: 820
|
||||
- backup: True
|
||||
- unless:
|
||||
# https://github.com/saltstack/salt/issues/52167
|
||||
# Will trigger 5 days (432000 sec) from cert expiration
|
||||
- 'enddate=$(date -d "$(openssl x509 -in /etc/pki/elasticsearch.crt -enddate -noout | cut -d= -f2)" +%s) ; now=$(date +%s) ; expire_date=$(( now + 432000)); [ $enddate -gt $expire_date ]'
|
||||
cmd.run:
|
||||
- name: "/usr/bin/openssl pkcs12 -inkey /etc/pki/elasticsearch.key -in /etc/pki/elasticsearch.crt -export -out /etc/pki/elasticsearch.p12 -nodes -passout pass:"
|
||||
- onchanges:
|
||||
- x509: /etc/pki/elasticsearch.key
|
||||
|
||||
miniokeyperms:
|
||||
file.managed:
|
||||
- replace: False
|
||||
- name: /etc/pki/elasticsearch.key
|
||||
- mode: 640
|
||||
- group: 930
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
{% set ES = salt['pillar.get']('manager:mainip', '') %}
|
||||
{%- set MANAGER = salt['grains.get']('master') %}
|
||||
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
|
||||
|
||||
|
||||
# Wait for ElasticSearch to come up, so that we can query for version infromation
|
||||
echo -n "Waiting for ElasticSearch..."
|
||||
@@ -35,6 +37,6 @@ echo "Applying cross cluster search config..."
|
||||
|
||||
{%- if salt['pillar.get']('nodestab', {}) %}
|
||||
{%- for SN, SNDATA in salt['pillar.get']('nodestab', {}).items() %}
|
||||
curl -XPUT http://{{ ES }}:9200/_cluster/settings -H'Content-Type: application/json' -d '{"persistent": {"search": {"remote": {"{{ SN }}": {"skip_unavailable": "true", "seeds": ["{{ SNDATA.ip }}:9300"]}}}}}'
|
||||
curl -XPUT http://{{ ES }}:9200/_cluster/settings -H'Content-Type: application/json' -d '{"persistent": {"search": {"remote": {"{{ SN }}": {"skip_unavailable": "true", "seeds": ["{{ SN.split('_')|first }}:9300"]}}}}}'
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
|
||||
@@ -1109,8 +1109,8 @@ minio_generate_keys() {
|
||||
|
||||
local charSet="[:graph:]"
|
||||
|
||||
ACCESS_KEY=$(tr -cd "$charSet" < /dev/urandom | tr -d \' | tr -d \" | head -c 20)
|
||||
ACCESS_SECRET=$(tr -cd "$charSet" < /dev/urandom | tr -d \' | tr -d \" | head -c 40)
|
||||
ACCESS_KEY=$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 20 | head -n 1)
|
||||
ACCESS_SECRET=$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 40 | head -n 1)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,22 @@ if [ "$OS" == ubuntu ]; then
|
||||
update-alternatives --set newt-palette /etc/newt/palette.original >> $setup_log 2>&1
|
||||
fi
|
||||
|
||||
setterm -blank 0 >> $setup_log 2>&1
|
||||
# Kernel consoleblank is causing whiptail progress screen to appear to hang #1084
|
||||
# https://github.com/Security-Onion-Solutions/securityonion/issues/1084
|
||||
if [ "$automated" == no ]; then
|
||||
TTY=$(tty)
|
||||
echo "Setup is running on TTY $TTY" >> $setup_log 2>&1
|
||||
if echo $TTY | grep -q "/dev/tty"; then
|
||||
CONSOLEBLANK=$(cat /sys/module/kernel/parameters/consoleblank)
|
||||
echo "Kernel consoleblank value before: $CONSOLEBLANK" >> $setup_log 2>&1
|
||||
if [ $CONSOLEBLANK -gt 0 ]; then
|
||||
echo "Running 'setterm -blank 0' for TTY $TTY" >> $setup_log 2>&1
|
||||
TERM=linux setterm -blank 0 >$TTY <$TTY
|
||||
CONSOLEBLANK=$(cat /sys/module/kernel/parameters/consoleblank)
|
||||
echo "Kernel consoleblank value after: $CONSOLEBLANK" >> $setup_log 2>&1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$setup_type" == 'iso' ] || (whiptail_you_sure); then
|
||||
true
|
||||
|
||||
Reference in New Issue
Block a user