SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Linux
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Linux Discussion related to the SageTV Media Center for Linux. Questions, issues, problems, suggestions, etc. relating to the SageTV Linux should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-05-2010, 09:11 PM
Grant.Edwards Grant.Edwards is offline
Sage User
 
Join Date: Apr 2010
Location: Minneapolis
Posts: 63
init.d/sagetv script for Gentoo?

Does anybody have an init.d/sagetv script for Gentoo that they'd like
to share?

The startsage and stopsage scripts seem to expect to be run as root
since they write to /var/run, which isn't writable by non-root (at
least on Gentoo)

However, if you do run those scripts as root, they run the sagetv
server _as_root_.

Are people running the sagetv server as root?

Before I start working on a proper /etc/init.d/sagetv script for
Gentoo, I thought I'd check to see if it had already been done.

I'm a bit surprised Sage doesn't provide Gentoo scripts, since they
apparently use Gentoo to build sagetv -- at least that's what I read
somewhere. Does the SageTv Gentoo ISO image contain proper init.d
scripts? [I'd check myself, but I can't figure out where you get
it...]
Reply With Quote
  #2  
Old 05-05-2010, 11:14 PM
Grant.Edwards Grant.Edwards is offline
Sage User
 
Join Date: Apr 2010
Location: Minneapolis
Posts: 63
I've started working on a Gentoo init script for sagetv (who knows,
when that's done, maybe I'll write an ebuild for it as well).

I've noticed a couple odd things in the startsage script.

One of the options being passed to the java executable is the class
path consisting of a colon-separated list of directories and .jar
files:
Code:
  -cp Sage.jar:.:/:$(echo JARs/*.jar | sed 's/ <A0>*/:/g')
What's odd is the regular expression specifying the pattern for which
sed is to substitute ':'. That regular expression specifies a single
space character followed by zero or more bytes with values of 0xA0.
Why the 0xA0 bytes? Are there versions of bash where the echo command
inserts 0xA0 bytes in its output?

AFAICT, when echo outputs filenames, they are always separated by a
single space. Why the 'zero or more 0xA0 bytes' in the RE?

FWIW, 0xA0 is an ISO8859-1 "non-breaking space".

I'm also pretty wary of putting "/" in the class path.

What exactly is sagetv expecting to find in the root directory?
Reply With Quote
  #3  
Old 05-06-2010, 04:20 AM
bcjenkins bcjenkins is offline
SageTVaholic
 
Join Date: Jan 2006
Posts: 3,764
Hi Grant,

I'll try to cover what I know (not much)

1) SageTV switched from Gentoo packaging to Ubuntu (Debian) a while ago.
2) You can run SageTV as a non-privlileged user although their default is root. Make sure the user is a member of video and serial/tty (tuning if needed).
3) I modify the start and stop scripts to change the pid file placement.

Take care,

B
__________________
Running SageTV on unRAID via Docker
Tuning handled by HDHR3-6CC-3X2 using OpenDCT
Reply With Quote
  #4  
Old 05-06-2010, 08:59 AM
Grant.Edwards Grant.Edwards is offline
Sage User
 
Join Date: Apr 2010
Location: Minneapolis
Posts: 63
Quote:
Originally Posted by bcjenkins View Post
Hi Grant,
I'll try to cover what I know (not much)

1) SageTV switched from Gentoo packaging to Ubuntu (Debian) a while ago.
That's pretty much what I concluded after spending some more time
looking for the SageTv Gentoo ISO download. It appears that all
references to it are a couple years old. [The Wikipedia page on
SageTv needs to be updated, since it still refers to a SageTv server
Gentoo distro.]
Quote:
2) You can run SageTV as a non-privlileged user although their default
is root. Make sure the user is a member of video and serial/tty
(tuning if needed).
Yep. I think I'm basically going to copy what was done for the mythtv
backend. It behaves very similarly to the SageTv server in that it
doesn't do any of the standard "deamonizing" stuff itself.

Though I don't think membership in the video group is required for
network-attached tuners like the HDHR, a general solution should have
the sagetv user as a member of the video group. Thanks for the
reminder about the serial ports.
Quote:
3) I modify the start and stop scripts to change the pid file placement.
From looking at the Gentoo init.d scripts for the myth backend, it
looks like the pid file handling is done with root privledges, so they
should be able to remain the normal place.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
XBMC Script for SageTV Released 3/1/2006 Coolwave SageTV Customizations 361 03-04-2009 03:15 PM
init script n8willis SageTV Linux 7 01-15-2007 03:33 PM
init scripts ChePazzo SageTV Linux 0 12-16-2006 12:28 PM
SageTV on Existing Gentoo Install plawlor SageTV Linux 2 05-22-2006 04:19 PM
Backup script for SageTV White94Cobra SageTV Software 1 12-19-2003 09:55 AM


All times are GMT -6. The time now is 12:31 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.