svn commit: r309504 - head/etc

Devin Teske dteske at FreeBSD.org
Sat Dec 3 19:03:41 UTC 2016


Author: dteske
Date: Sat Dec  3 19:03:40 2016
New Revision: 309504
URL: https://svnweb.freebsd.org/changeset/base/309504

Log:
  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

Modified:
  head/etc/rc.subr

Modified: head/etc/rc.subr
==============================================================================
--- head/etc/rc.subr	Sat Dec  3 19:03:25 2016	(r309503)
+++ head/etc/rc.subr	Sat Dec  3 19:03:40 2016	(r309504)
@@ -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-head mailing list