{
    "content": [
        {
            "type": "text",
            "text": "# SYSTEMD-RUN-GENERATOR (info)\n\n## NAME\n\nsystemd-run-generator - Generator for invoking commands specified on the kernel command line as system service\n\n## SYNOPSIS\n\n/lib/systemd/system-generators/systemd-run-generator\n\n## DESCRIPTION\n\nsystemd-run-generator is a generator that reads the kernel command line\nand understands three options:\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **EXAMPLE**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "SYSTEMD-RUN-GENERATOR",
        "section": "",
        "mode": "info",
        "summary": "systemd-run-generator - Generator for invoking commands specified on the kernel command line as system service",
        "synopsis": "/lib/systemd/system-generators/systemd-run-generator",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "Use a command like the following to add a user to the user database",
            "inside a container run with systemd-nspawn(7):",
            "# systemd-nspawn -D mycontainer -b systemd.run='\"adduser test\"'",
            "(Note the requirement for double quoting in the command line above. The",
            "first level of quoting ('') is processed and removed by the command",
            "shell used to invoke systemd-nspawn. The second level of quoting (\"\")",
            "is propagated to the kernel command line of the container and processed",
            "and removed by systemd-run-generator. Both together make sure both",
            "words of the specified command line adduser test end up in the",
            "generated unit file together and are neither split apart by the command",
            "shell nor by the generator.)"
        ],
        "see_also": [
            {
                "name": "systemd",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
            },
            {
                "name": "systemctl",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemctl/1/json"
            },
            {
                "name": "kernel-command-line",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/kernel-command-line/7/json"
            },
            {
                "name": "systemd-nspawn",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/systemd-nspawn/7/json"
            },
            {
                "name": "systemd.unit",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.unit/5/json"
            },
            {
                "name": "systemd.service",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.service/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 22,
                "subsections": []
            },
            {
                "name": "EXAMPLE",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "systemd-run-generator - Generator for invoking commands specified on\nthe kernel command line as system service\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "/lib/systemd/system-generators/systemd-run-generator\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "systemd-run-generator is a generator that reads the kernel command line\nand understands three options:\n\nIf the systemd.run= option is specified and followed by a command line,\na unit named kernel-command-line.service is generated for it and booted\ninto. The service has Type=oneshot set, and has SuccessAction=exit and\nFailureAction=exit configured by default, thus ensuring that the system\nis shut down as soon as the command completes. The exit status of the\ncommand line is propagated to the invoking container manager, if this\napplies (which might propagate this further, to the calling shell --\ne.g.  systemd-nspawn(7) does this). If this option is used multiple\ntimes the unit file will contain multiple ExecStart= lines, to execute\nall commands in order. The command is started as regular service, i.e.\nwith DefaultDependencies= on.\n\nUse systemd.runsuccessaction= and systemd.runfailureaction= to\ntweak how to react to the process completing. In particular assigning\n\"none\" will leave the system running after the command completes. For\nfurther details on supported arguments, see systemd.unit(5).\n\nsystemd-run-generator implements systemd.generator(7).\n",
                "subsections": []
            },
            "EXAMPLE": {
                "content": "Use a command like the following to add a user to the user database\ninside a container run with systemd-nspawn(7):\n\n# systemd-nspawn -D mycontainer -b systemd.run='\"adduser test\"'\n\n(Note the requirement for double quoting in the command line above. The\nfirst level of quoting ('') is processed and removed by the command\nshell used to invoke systemd-nspawn. The second level of quoting (\"\")\nis propagated to the kernel command line of the container and processed\nand removed by systemd-run-generator. Both together make sure both\nwords of the specified command line adduser test end up in the\ngenerated unit file together and are neither split apart by the command\nshell nor by the generator.)\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "systemd(1), systemctl(1), kernel-command-line(7), systemd-nspawn(7),\nsystemd.unit(5), systemd.service(5)\n\nsystemd 249                                           SYSTEMD-RUN-GENERATOR(8)",
                "subsections": []
            }
        }
    }
}