Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Dec 2016 19:03:40 +0000 (UTC)
From:      Devin Teske <dteske@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r309504 - head/etc
Message-ID:  <201612031903.uB3J3eq0057647@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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
 					#



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612031903.uB3J3eq0057647>