(args)
Configure the standalone receiver and the host

    Set all parameters required on the standalone receiver: signal, LNB, and
    MPE parameters. Then, configure the host to communicate with the the
    standalone DVB-S2 receiver by setting reverse-path filters and firewall
    configurations.
Configure the standalone receiver and the host
Configure the standalone receiver and the host
def cfg_standalone(args):
    """Configure the standalone receiver and the host

    Set all parameters required on the standalone receiver: signal, LNB, and
    MPE parameters. Then, configure the host to communicate with the the
    standalone DVB-S2 receiver by setting reverse-path filters and firewall
    configurations.

    """
    user_info = config.read_cfg_file(args.cfg, args.cfg_dir)
    if (user_info is None):
        return

    # Configure the subprocess runner
    runner.set_dry(args.dry_run)

    # IP Address
    rx_ip_addr = _parse_address(user_info, args.address)

    if (not args.rx_only):
        if 'netdev' not in user_info['setup']:
            assert(args.interface is not None), \
                ("Please specify the network interface through option "
                 "\"-i/--interface\"")

        interface = args.interface if (args.interface is not None) else \
            user_info['setup']['netdev']

        # Check if all dependencies are installed
        if (not dependencies.check_apps(["iptables"])):
            return

        rp.set_filters([interface], prompt=(not args.yes), dry=args.dry_run)
        firewall.configure([interface],
                           defs.src_ports,
                           user_info['sat']['ip'],
                           igmp=True,
                           prompt=(not args.yes),
                           dry=args.dry_run)

    if (not args.host_only):
        util.print_header("Receiver Configuration")
        s400 = S400Client(args.demod, rx_ip_addr, args.port, dry=args.dry_run)
        s400.configure(user_info)
def cfg_standalone ( args ) : user_info = config . read_cfg_file ( args . cfg , args . cfg_dir ) if ( user_info is None ) : return # Configure the subprocess runner runner . set_dry ( args . dry_run ) # IP Address rx_ip_addr = _parse_address ( user_info , args . address ) if ( not args . rx_only ) : if 'netdev' not in user_info [ 'setup' ] : assert ( args . interface is not None ) , ( "Please specify the network interface through option " "\"-i/--interface\"" ) interface = args . interface if ( args . interface is not None ) else user_info [ 'setup' ] [ 'netdev' ] # Check if all dependencies are installed if ( not dependencies . check_apps ( [ "iptables" ] ) ) : return rp . set_filters ( [ interface ] , prompt = ( not args . yes ) , dry = args . dry_run ) firewall . configure ( [ interface ] , defs . src_ports , user_info [ 'sat' ] [ 'ip' ] , igmp = True , prompt = ( not args . yes ) , dry = args . dry_run ) if ( not args . host_only ) : util . print_header ( "Receiver Configuration" ) s400 = S400Client ( args . demod , rx_ip_addr , args . port , dry = args . dry_run ) s400 . configure ( user_info )