Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 218398 - media-tv/gentoo-vdr-scripts-0.4.3 vdr init script not using conf.d nice value when not run from console
Summary: media-tv/gentoo-vdr-scripts-0.4.3 vdr init script not using conf.d nice value...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo VDR Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-19 12:07 UTC by kalium
Modified: 2012-01-15 20:59 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.