btsetup
index
/usr/local/share/apps/kbtv/btsetup.py

Setup utility for bktr and tuner (stand-alone)

 
Modules
       
btcopyright
bthardware
commands
os
sys

 
Functions
       
addUser(uid)
Adds a user to operator group
commitConfig()
Commits changes to the system
failedMsg(op)
Prints "Operation failed <the_operation>"
loadModule(mod)
Tries loading module mod, where mod is BKTR, SAA, SND, or PWC
main()
Main function. Keeps displaying the btcontrol prompt and shows
output when commands are issued. Defaults to help text output.
overrideCard(sysctl)
Sets a sysctl for bktr TV card, hw.bt848.card (-1..18)
overrideTuner(sysctl)
Sets a sysctl for bktr tuner, hw.bt848.tuner (-1..14)
rootMsg()
Prints "You must be root"
showCameras()
Prints a numbered list of camera products/models for pwc
showCards()
Prints a numbered list of TV cards for both bktr and saa
showConfig()
Prints current config
showTuners()
Prints a numbered list of tuner types for both bktr and saa
showUsers()
Prints a list of members of the operator group
testRoot()
Test for root, returns True if we are UID 0

 
Data
        BKTR = 0
COMMANDS = ('help', 'show', 'adduser', 'kldload', 'sysctl', 'commit', 'quit')
HELPTEXT = 'help - Show this he...\nquit - Quit btsetup'
KBTV_AUTHOR = 'Danny Pansters'
KBTV_AUTHOR_EMAIL = 'danny@ricin.com'
KBTV_COPYRIGHT = '(c) 2005-2007, Danny Pansters <danny@ricin.com>'
KBTV_LICENSE = 'BSD'
KBTV_LICENSE_TEXT = '(c) 2005-2007, Danny Pansters <danny@ricin.com>\n...EN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n'
KBTV_MAINPATH = '/usr/local/bin'
PROMPT = 'btsetup> '
PWC = 3
SAA = 1
SND = 2
exit = False