mirror of
git://code.qt.io/qt/qt5.git
synced 2026-01-27 17:06:43 +08:00
Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.5 6.6 Task-number: QTBUG-67283 Task-number: QTBUG-108364 Change-Id: If26e4d35c780db4a7982bb84872b251dad24716e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
33 lines
1.0 KiB
Bash
Executable File
33 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright (C) 2021 The Qt Company Ltd.
|
|
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
|
|
|
# This script will set ulimit size for open files
|
|
# Linker for Qt Webengine builds needs to open a multiple files. Without this it will hit the limit.
|
|
|
|
file="/etc/security/limits.conf"
|
|
file2="/etc/pam.d/common-session"
|
|
sudo sed -i '/End of file/d' $file
|
|
sudo tee -a $file <<"EOF"
|
|
* soft nproc 4096
|
|
* hard nproc 4096
|
|
* soft nofile 4096
|
|
* hard nofile 4096
|
|
root soft nproc 4096
|
|
root hard nproc 4096
|
|
root soft nofile 4096
|
|
root hard nofile 4096
|
|
# End of file
|
|
EOF
|
|
|
|
sudo sed -i '/end of pam-auth-update config/d' $file2
|
|
sudo tee -a $file2 <<"EOF"
|
|
session required pam_limits.so
|
|
# end of pam-auth-update config
|
|
EOF
|
|
|
|
# This is required for UI login. Without this the ulimit will be 1024 during graphical login.
|
|
sudo tee -a /etc/systemd/user.conf <<"EOF"
|
|
DefaultLimitNOFILE=4096
|
|
EOF
|