Skip to content

'systemctl show' always shows DefaultDependencies=yes #2992

Closed

Description

@ebiggers

Create the file /etc/systemd/system/deptest.service containing the following:

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/true
DefaultDependencies=no

Run systemctl start deptest.service.

Run systemctl show deptest.service | grep DefaultDependencies.

Expected output:

DefaultDependencies=no

Actual output:

DefaultDependencies=yes

systemd version is 229.

Activity

  1. ebiggers commented on Apr 8, 2016

    @ebiggers
    ContributorAuthor

    Found the problem. DefaultDependencies has to be configured in the [Unit] section, not the [Service] section. Unfortunately, although the effects of DefaultDependencies are documented in the systemd.service man page, it is not mentioned that this option needs to go in the [Unit] section, not the [Service] section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions