系统单元文件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中加入字符串组以创建复合字符串   java系统甚至不点击“下一步”或“上一步”按钮就将我返回到上一页,而不是进入下一页   java如何在arrayList中获取特定列的不同值   CXF GZIP REST JAVA   Java:使用大量半恒定标志检查优化循环中的循环?   java如何在两个应用程序之间进行会话管理?   java SVG文件使用蜡染(但没有轴线)转换为PNG   使用协议缓冲区和内部数据模型的java   java如何在logtag 安卓中打印和查看字符串的值   javascript如何在NodeJs中应用Java/Spring的分层架构?   java Spring URL在JSP中编码不正确   模式对话框后面的java工具提示   java WSRPC生成日历对象而不是日期   在对象外部无法识别类变量   java将图像从文件读/写到BuffereImage的最快方法?   JavaSpring数据存储库对具有不同Id的子类使用抽象超类   安全在Java 5.0上运行web应用程序服务器有危险吗?