svn commit: r310010 - stable/11/etc

Devin Teske dteske at FreeBSD.org
Tue Dec 13 04:50:46 UTC 2016


Author: dteske
Date: Tue Dec 13 04:50:45 2016
New Revision: 310010
URL: https://svnweb.freebsd.org/changeset/base/310010

Log:
  MFC r309504: Fix bug preventing limits(1) from being applied
  
  PR:		misc/212493
  Differential Revision:	https://reviews.freebsd.org/D8232
  Submitted by:	girgen
  Reviewed by:	adrian

Modified:
  stable/11/etc/rc.subr
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/etc/rc.subr
==============================================================================
--- stable/11/etc/rc.subr	Tue Dec 13 04:47:21 2016	(r310009)
+++ stable/11/etc/rc.subr	Tue Dec 13 04:50:45 2016	(r310010)
@@ -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
 					#


More information about the svn-src-stable-11 mailing list