Bug 108465 - [patch] databases/memcached: allow to run with negative priority (niceness)
Summary: [patch] databases/memcached: allow to run with negative priority (niceness)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Marcus Alves Grando
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-28 08:00 UTC by Anton Yuzhaniov
Modified: 2007-04-06 19:36 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Yuzhaniov 2007-01-28 08:00:35 UTC
rc.d script uses var memcached_user to set -u option for memcached, but *_user variables
has special meaning in rc.subr - if $name_user is set, command
run via su(1).

It not need for memcached, because it has -u option, and this don't
allow to increase process priority.

In 6.2 nice run before su, and it possible to increase priority:
http://lists.freebsd.org/pipermail/cvs-all/2006-August/185240.html
but anyway su(1) don't need for memcached.

Fix: 

+unset memcached_user
+
 run_rc_command "$1"

Another option is rename memcached_user to memcached_username, but it
break POLA.--2Sb7Zaky75l1c3DfPFfIHmB9RBsEfkISMRLMSwKrJW1KLvQz
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- files/memcached.in.orig     Sun Jan 28 10:11:44 2007
+++ files/memcached.in  Sun Jan 28 10:12:12 2007
@@ -28,4 +28,6 @@
 command=%%PREFIX%%/bin/memcached
 command_args="-d -u ${memcached_user}"
How-To-Repeat: 
Add to /etc/rc.conf

memcached_enable="YES"
memcached_nice="-10"

# /usr/local/etc/rc.d/memcached start
Starting memcached.
nice: setpriority: Permission denied
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-01-28 08:00:50 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mnag

Over to maintainer
Comment 2 dfilter service freebsd_committer freebsd_triage 2007-04-06 19:27:33 UTC
mnag        2007-04-06 18:27:30 UTC

  FreeBSD ports repository

  Modified files:
    databases/memcached  Makefile distinfo 
    databases/memcached/files memcached.in 
  Log:
  - Update to 1.2.1
  - Change rc.d script to allow to run with negative priority. [1]
  
  PR:             108465 [1]
  Submitted by:   Anton Yuzhaninov <citrin___rambler-co.ru> [1]
  
  Revision  Changes    Path
  1.22      +2 -3      ports/databases/memcached/Makefile
  1.8       +3 -3      ports/databases/memcached/distinfo
  1.3       +3 -1      ports/databases/memcached/files/memcached.in
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Marcus Alves Grando freebsd_committer freebsd_triage 2007-04-06 19:36:25 UTC
State Changed
From-To: open->closed

Committed. Thanks!