MythTV master
config.py
Go to the documentation of this file.
1# -*- coding: utf-8 -*-
2
3import os, re, sys
4from subprocess import Popen, PIPE
5import os_detect
6
7SMOON_URL = "http://smolt.mythtv.org/"
8SECURE = 0
9
10from MythTV import MythDB
11confdir = os.path.join(MythDB().dbconfig.confdir, 'HardwareProfile')
12try:
13 os.mkdir(confdir, 0o700)
14except OSError:
15 pass
16
17HW_UUID = os.path.join(confdir, 'hw-uuid')
18PUB_UUID = os.path.join(confdir, 'pub-uuid')
19UUID_DB = os.path.join(confdir, 'uuiddb.cfg')
20ADMIN_TOKEN = os.path.join(confdir, 'smolt_token')
21
22#These are the defaults taken from the source code.
23#fs_types = get_config_attr("FS_TYPES", ["ext2", "ext3", "xfs", "reiserfs"])
24#fs_mounts = get_config_attr("FS_MOUNTS", ["/", "/home", "/etc", "/var", "/boot"])
25#fs_m_filter = get_config_attr("FS_M_FILTER", False)
26#fs_t_filter = get_config_attr("FS_T_FILTER", False)
27
28FS_T_FILTER=False
29FS_M_FILTER=True
30
31try:
32 # This doesn't appear to be used and the old rpm command didn't return mounts.
33 p = Popen(['findmnt', '--noheadings', '--output', 'TARGET', '--raw', '--fstab'], stdout=PIPE)
34 FS_MOUNTS = p.stdout.read().decode('utf-8')
35except OSError:
36 FS_MOUNTS = ''
37
38#This will attempt to find the distro.
39#Uncomment any of the OS lines below to hardcode.
41
42
43#For non RH Distros
44#HW_UUID = "/etc/smolt/hw-uuid"
45