diff options
author | Devin Teske <dteske@FreeBSD.org> | 2016-12-03 19:03:40 +0000 |
---|---|---|
committer | Devin Teske <dteske@FreeBSD.org> | 2016-12-03 19:03:40 +0000 |
commit | 4f389670379460b6054d0b0383e47f7971875c44 (patch) | |
tree | 600fd1de8def3c4ed9d964f2b041c125f1acf8ee /etc/rc.subr | |
parent | 4d12189b6cc013f81a1ef2149fc2e66e9e4b771e (diff) | |
download | src-4f389670379460b6054d0b0383e47f7971875c44.tar.gz src-4f389670379460b6054d0b0383e47f7971875c44.zip |
Fix bug preventing limits(1) from being applied
PR: misc/212493
Differential Revision: https://reviews.freebsd.org/D8232
Submitted by: girgen
Reviewed by: adrian
MFC after: 3 days
X-MFC-to: stable/11
Notes
Notes:
svn path=/head/; revision=309504
Diffstat (limited to 'etc/rc.subr')
-rw-r--r-- | etc/rc.subr | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/rc.subr b/etc/rc.subr index 340ef4eb869c..fbbf5b082bbd 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -1045,6 +1045,7 @@ run_rc_command() # check_startmsgs && echo "Starting ${name}." if [ -n "$_chroot" ]; then + _cd= _doit="\ ${_nice:+nice -n $_nice }\ ${_fib:+setfib -F $_fib }\ @@ -1052,8 +1053,8 @@ ${_env:+env $_env }\ chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups }\ $_chroot $command $rc_flags $command_args" else + _cd="${_chdir:+cd $_chdir && }" _doit="\ -${_chdir:+cd $_chdir && }\ ${_fib:+setfib -F $_fib }\ ${_env:+env $_env }\ $command $rc_flags $command_args" @@ -1072,7 +1073,7 @@ $command $rc_flags $command_args" fi # Prepend default limits - _doit="limits -C $_login_class $_doit" + _doit="$_cd limits -C $_login_class $_doit" # run the full command # |