mirror of
https://abf.rosa.ru/djam/limits.git
synced 2025-04-23 15:55:40 +00:00
apply limits also for systemd user units
See also: db7aa5287b (diff-F1L290)
This commit is contained in:
parent
f9de6a3d6e
commit
99425dc876
1 changed files with 6 additions and 1 deletions
|
@ -1,8 +1,9 @@
|
||||||
%define _systemd_confdir /usr/lib/systemd/system.conf.d
|
%define _systemd_confdir /usr/lib/systemd/system.conf.d
|
||||||
|
%define _systemd_user_confdir /usr/lib/systemd/user.conf.d
|
||||||
|
|
||||||
Summary: Set kernel limits
|
Summary: Set kernel limits
|
||||||
Name: limits
|
Name: limits
|
||||||
Version: 1
|
Version: 2
|
||||||
Release: 1
|
Release: 1
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: System/Configuration/Boot and Init
|
Group: System/Configuration/Boot and Init
|
||||||
|
@ -24,6 +25,7 @@ Set big enough kernel limits
|
||||||
%config(noreplace) %{_sysconfdir}/security/limits.d/95-%{name}-big.conf
|
%config(noreplace) %{_sysconfdir}/security/limits.d/95-%{name}-big.conf
|
||||||
# no %%config(noreplace), it can be overriden in /etc/systemd/system.conf.d/
|
# no %%config(noreplace), it can be overriden in /etc/systemd/system.conf.d/
|
||||||
%{_systemd_confdir}/10-%{name}-big.conf
|
%{_systemd_confdir}/10-%{name}-big.conf
|
||||||
|
%{_systemd_user_confdir}/10-%{name}-big.conf
|
||||||
|
|
||||||
#------------------------------------------------------------------
|
#------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -36,6 +38,7 @@ set -u
|
||||||
mkdir -p %{buildroot}
|
mkdir -p %{buildroot}
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/security/limits.d
|
mkdir -p %{buildroot}%{_sysconfdir}/security/limits.d
|
||||||
mkdir -p %{buildroot}%{_systemd_confdir}
|
mkdir -p %{buildroot}%{_systemd_confdir}
|
||||||
|
mkdir -p %{buildroot}%{_systemd_user_confdir}
|
||||||
|
|
||||||
# took some ideas from https://packages.altlinux.org/ru/sisyphus/srpms/pam-limits-desktop/
|
# took some ideas from https://packages.altlinux.org/ru/sisyphus/srpms/pam-limits-desktop/
|
||||||
|
|
||||||
|
@ -66,4 +69,6 @@ DefaultLimitNPROC=$NPROC_SOFT:infinity
|
||||||
DefaultLimitNOFILE=$NOFILE_SOFT:$NOFILE_HARD
|
DefaultLimitNOFILE=$NOFILE_SOFT:$NOFILE_HARD
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
cp %{buildroot}%{_systemd_confdir}/10-%{name}-big.conf %{buildroot}%{_systemd_user_confdir}
|
||||||
|
|
||||||
set +u
|
set +u
|
||||||
|
|
Loading…
Add table
Reference in a new issue