Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 218398

Summary: media-tv/gentoo-vdr-scripts-0.4.3 vdr init script not using conf.d nice value when not run from console
Product: Gentoo Linux Reporter: kalium
Component: [OLD] UnspecifiedAssignee: Gentoo VDR Project <vdr>
Status: RESOLVED NEEDINFO    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description kalium 2008-04-19 12:07:01 UTC
Have a cron script that restarts vdr. However, I have configured vdr to use nice level -5. When the cron script restarts vdr, the nice value is at 5! Does not happen upon manual restart.

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-04-19 16:03:36 UTC
What does your cron script look like?
Comment 2 kalium 2008-04-19 22:58:43 UTC
#!/bin/bash

set -e || exit 1
exec >> /var/log/restart_vdr_to_save_epgdata.log
exec 2>&1
set -v
set -x
set -o pipefail

date

maxage=36000
epgf=/scratch/vdr/epg.data
minnextrel=300

# update epg.data file (if it exists) not more often than every 10 hours
# (well, actually, I don't want vdr to be restarted more often than that...)
if [[ -e "$epgf" ]]; then
    age=$(( $(date +%s) - $(stat -c %Y "$epgf") ))
    (( age <= maxage )) && exit 0
fi

# make sure we aren't recording something right now
nextrel=$(echo -e "next rel\nquit" | netcat localhost 2001 | grep ^250 | perl -ne '/^250\s+\S+\s+(\S+)/&&print $1') || nextrel=$minnextrel
(( nextrel < minnextrel )) && exit 0

/etc/init.d/vdr restart

exit 0
Comment 3 Christian Ruppert (idl0r) gentoo-dev 2012-01-15 20:59:38 UTC
Please reopen if gentoo-vdr-scripts-0.4.9 or newer is still affected.