MythTV  master
config.py
Go to the documentation of this file.
1 # -*- coding: utf-8 -*-
2 
3 import os, re, sys
4 from subprocess import Popen, PIPE
5 import os_detect
6 
7 SMOON_URL = "http://smolt.mythtv.org/"
8 SECURE = 0
9 
10 from MythTV import MythDB
11 confdir = os.path.join(MythDB().dbconfig.confdir, 'HardwareProfile')
12 try:
13  os.mkdir(confdir, 0o700)
14 except OSError:
15  pass
16 
17 HW_UUID = os.path.join(confdir, 'hw-uuid')
18 PUB_UUID = os.path.join(confdir, 'pub-uuid')
19 UUID_DB = os.path.join(confdir, 'uuiddb.cfg')
20 ADMIN_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 
28 FS_T_FILTER=False
29 FS_M_FILTER=True
30 
31 try:
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', '--real'], stdout=PIPE)
34  FS_MOUNTS = p.stdout.read().decode('utf-8')
35 except 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 
static int decode(unsigned char *vbiline, int scale0, int scale1)
Definition: cc.cpp:68