系统单元文件linter

systemdlint的Python项目详细描述


systemd unitfile linter

用法

usage: systemdlint [-h][--nodropins][--rootpath ROOTPATH][--sversion SVERSION][--output OUTPUT]
                   files [files ...]

Systemd Unitfile Linter

positional arguments:
  files                Files to parse

optional arguments:
  -h, --help           show this help message and exit
  --nodropins          Ignore Drop-Ins for parsing
  --rootpath ROOTPATH  Root path
  --sversion SVERSION  Version of Systemd to be used
  --output OUTPUT      Where to flush the findings (default: stderr)

输出

工具将返回

{file}:{line}:{severity}\[{id}\] - {message}

示例:

/lib/systemd/system/console-shell.service:18:info [NoFailureCheck] - Return-code check is disabled. Errors are not reported
/lib/systemd/system/plymouth-halt.service:11:info [NoFailureCheck] - Return-code check is disabled. Errors are not reported
/lib/systemd/system/systemd-ask-password-console.service:12:warning [ReferencedUnitNotFound] - The Unit 'systemd-vconsole-setup.service' referenced was not found in filesystem
/lib/systemd/system/basic.target:19:warning [ReferencedUnitNotFound] - The Unit 'tmp.mount' referenced was not found in filesystem

可检测错误

  • 冲突选项-set选项与 另一个单位
  • execnotfound-在系统上找不到引用的可执行文件
  • full privileges-以完全权限运行可执行文件
  • InvalidNumericBase-数值不匹配,因为它需要 是x的倍数
  • InvalidSetting-选项与节不匹配
  • invalidValue-设置的值无效
  • mandatory option missing-文件中缺少强制选项
  • 多重性-该选项对于给定数量的 此上下文中的选项
  • noExecutable-引用的可执行文件不可执行
  • nofailurecheck-运行可执行文件时不检查故障
  • optionDeprected-已使用的选项在此中不再可用 版本
  • optiontoonew-使用的选项将在更高版本中可用 超过使用量
  • referencedUnitNotFound-在系统中找不到引用的单元
  • 设置需要-该选项需要设置另一个选项
  • 设置受限-由于另一个选项,无法设置该选项
  • syntaxerror-文件不可解析
  • unit section missing-文件中缺少unit节
  • UnknownUnitType-文件的扩展名未知 系统一
  • 错误的文件掩码-文件设置了有风险的文件模式
  • errorCyclicDependency-单元创建循环依赖项

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
如何将java ArrayList对象转换为实际值   web服务如何在JAVA类uisng JAXBElement中解组SOAP UI值   包含无值参数的java HttpClient表单URL   运行简单Camel Restlet演示项目的java问题?   带有自定义图标的java简单SWT警报消息?   java Netbeans 6.8:LibImport可以工作,但编译时“包不存在”   java如何获得绘画完成的通知?   java Hazelcast客户端模式群集故障后如何恢复?   Neo4J中Shapefile的java批插入   为什么ThreadPoolExecutor在Eclipse和从命令行运行Java程序时表现不同?   java在Android中计算两个坐标之间的距离时得到了荒谬的值   java在CardLayout中显示卡本身的下一张卡