mirror of
https://abf.rosa.ru/djam/limits.git
synced 2025-04-25 01:45:44 +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_user_confdir /usr/lib/systemd/user.conf.d
|
||||
|
||||
Summary: Set kernel limits
|
||||
Name: limits
|
||||
Version: 1
|
||||
Version: 2
|
||||
Release: 1
|
||||
License: BSD
|
||||
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
|
||||
# no %%config(noreplace), it can be overriden in /etc/systemd/system.conf.d/
|
||||
%{_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}%{_sysconfdir}/security/limits.d
|
||||
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/
|
||||
|
||||
|
@ -66,4 +69,6 @@ DefaultLimitNPROC=$NPROC_SOFT:infinity
|
|||
DefaultLimitNOFILE=$NOFILE_SOFT:$NOFILE_HARD
|
||||
EOF
|
||||
|
||||
cp %{buildroot}%{_systemd_confdir}/10-%{name}-big.conf %{buildroot}%{_systemd_user_confdir}
|
||||
|
||||
set +u
|
||||
|
|
Loading…
Add table
Reference in a new issue