Exemplo n.º 1
0
            log_level = 'debug'

        elif o == '-s':
            quiet_mode = True

    if not log.set_level(log_level):
        usage()
    if not quiet_mode:
        utils.log_title(__title__, __version__)
        
    mod.lockInstance(__mod__, True)
    log_file = os.path.normpath('%s/hplip_queues.log'%prop.user_dir)
    log.debug(log.bold("Saving output in log file: %s" % log_file))
    if os.path.exists(log_file):
        try:
            os.remove(log_file)
        except OSError:
            pass
    log.set_logfile(log_file)
    log.set_where(log.LOG_TO_CONSOLE_AND_FILE)

    passwordObj = password.Password(mode)
    queues.main_function(passwordObj, mode,ui_toolkit, quiet_mode )
    
               
except KeyboardInterrupt:
    log.error("User exit")

mod.unlockInstance()
log.debug("Done.")
Exemplo n.º 2
0
#            log.info(log.bold('-'*len("Missing User Groups")))
#            log.info("%s"%core.get_missing_user_grps())
#            authenticate(core)
#            if core.add_groups_to_user(core.get_missing_user_grps(), core.get_user_grp_cmd()):
#                IS_RESTART_REQ = True

        if core.get_disable_selinux_status():
            log.info(log.bold("SELinux Status"))
            log.info(log.bold('-'*len("SELinux Status")))
            log.info("SELinux is enabled. Needs to be disabled")
            authenticate(core)
            if core.disable_SELinux():
                IS_RESTART_REQ = True

    log.info(log.bold("\n\nChecking for Configured Queues...."))
    queues.main_function(core.passwordObj, MODE,ui_toolkit, False, DEVICE_URI)

    log.info(log.bold("\n\nChecking for HP Properitery Plugin's...."))
    ### Check for Plugin Printers
    install_plugin(core)

    smart_ins_dev_list = smart_install.get_smartinstall_enabled_devices()
    if smart_ins_dev_list:
        log.info(log.bold("\n\nChecking for 'CD-ROM'/'Smart Install' Detected Devices...."))
        url, tool_name = smart_install.get_SmartInstall_tool_info()
        for printer in smart_ins_dev_list:
            log.error("Smart Install is Enabled in '%s' Printer. This needs to be disabled."%printer)
        log.info(log.bold("\nRefer link '%s' to disable Smart Install manually.\n"%(url)))

    comm_err_dev = core.get_communication_error_devs()
    if comm_err_dev:
Exemplo n.º 3
0
            log_level = 'debug'

        elif o == '-s':
            quiet_mode = True

    if not log.set_level(log_level):
        usage()
    if not quiet_mode:
        utils.log_title(__title__, __version__)

    mod.lockInstance(__mod__, True)
    log_file = os.path.normpath('%s/hplip_queues.log'%prop.user_dir)
    log.debug(log.bold("Saving output in log file: %s" % log_file))
    if os.path.exists(log_file):
        try:
            os.remove(log_file)
        except OSError:
            pass
    log.set_logfile(log_file)
    log.set_where(log.LOG_TO_CONSOLE_AND_FILE)

    passwordObj = password.Password(mode)
    queues.main_function(passwordObj, mode,ui_toolkit, quiet_mode )


except KeyboardInterrupt:
    log.error("User exit")

mod.unlockInstance()
log.debug("Done.")
Exemplo n.º 4
0
#            log.info(log.bold('-'*len("Missing User Groups")))
#            log.info("%s"%core.get_missing_user_grps())
#            authenticate(core)
#            if core.add_groups_to_user(core.get_missing_user_grps(), core.get_user_grp_cmd()):
#                IS_RESTART_REQ = True

        if core.get_disable_selinux_status():
            log.info(log.bold("SELinux Status"))
            log.info(log.bold('-' * len("SELinux Status")))
            log.info("SELinux is enabled. Needs to be disabled")
            authenticate(core)
            if core.disable_SELinux():
                IS_RESTART_REQ = True

    log.info(log.bold("\n\nChecking for Configured Queues...."))
    queues.main_function(core.passwordObj, MODE, ui_toolkit, False, DEVICE_URI)

    log.info(log.bold("\n\nChecking for HP Properitery Plugin's...."))
    ### Check for Plugin Printers
    install_plugin(core)

    smart_ins_dev_list = smart_install.get_smartinstall_enabled_devices()
    if smart_ins_dev_list:
        log.info(
            log.bold(
                "\n\nChecking for 'CD-ROM'/'Smart Install' Detected Devices...."
            ))
        url, tool_name = smart_install.get_SmartInstall_tool_info()
        for printer in smart_ins_dev_list:
            log.error(
                "Smart Install is Enabled in '%s' Printer. This needs to be disabled."
Exemplo n.º 5
0
            print __doc__,
            sys.exit(0)

        elif o in ('-l', '--logging'):
            log_level = a.lower().strip()

        elif o == '-g':
            log_level = 'debug'

        elif o == '-s':
            quiet_mode = True

    if not log.set_level(log_level):
        usage()
    if not quiet_mode:
        utils.log_title(__title__, __version__)

    log_file = os.path.normpath('/var/log/hp/hplip_queues.log')
    log.debug(log.bold("Saving output in log file: %s" % log_file))
    if os.path.exists(log_file):
        os.remove(log_file)
    log.set_logfile(log_file)
    log.set_where(log.LOG_TO_CONSOLE_AND_FILE)

    queues.main_function(mode, ui_toolkit, quiet_mode, True)

except KeyboardInterrupt:
    log.error("User exit")

log.debug("Done.")
Exemplo n.º 6
0
            sys.exit(0)

        elif o in ('-l', '--logging'):
            log_level = a.lower().strip()

        elif o == '-g':
            log_level = 'debug'

        elif o == '-s':
            quiet_mode = True

    if not log.set_level(log_level):
        usage()
    if not quiet_mode:
        utils.log_title(__title__, __version__)

    log_file = os.path.normpath('/var/log/hp/hplip_queues.log')
    log.debug(log.bold("Saving output in log file: %s" % log_file))
    if os.path.exists(log_file):
        os.remove(log_file)
    log.set_logfile(log_file)
    log.set_where(log.LOG_TO_CONSOLE_AND_FILE)
    
    queues.main_function(mode,ui_toolkit, quiet_mode, True )
    
               
except KeyboardInterrupt:
    log.error("User exit")

log.debug("Done.")