Skip to content

Conversation

@fbuihuu
Copy link
Contributor

@fbuihuu fbuihuu commented Jan 29, 2018

Previous code was using the basename(id->fragment_path) which returned
incorrect result if the unit was an instance.

For example, assuming that no instances of "template" have been created so far:

$ systemctl enable template@1
Created symlink from /etc/systemd/system/multi-user.target.wants/[email protected] to /usr/lib/systemd/system/[email protected].

$ systemctl is-enabled [email protected]
disabled

$ systemctl status [email protected]
[email protected] - openQA Worker #3
Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled; vendor preset: disabled)
[...]

Here the unit file states reported by "status" and "is-enabled" were different.

Previous code was using the basename(id->fragment_path) which returned
incorrect result if the unit was an instance.

For example, assuming that no instances of "template" have been created so far:

 $ systemctl enable template@1
 Created symlink from /etc/systemd/system/multi-user.target.wants/[email protected] to /usr/lib/systemd/system/[email protected].

 $ systemctl is-enabled [email protected]
 disabled

 $ systemctl status [email protected][email protected] - openQA Worker systemd#3
    Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled; vendor preset: disabled)
    [...]

Here the unit file states reported by "status" and "is-enabled" were different.
@yuwata yuwata added the pid1 label Jan 29, 2018
@keszybz keszybz merged commit 9ea3a0e into systemd:master Feb 7, 2018
@fbuihuu fbuihuu deleted the fix-status branch February 13, 2018 16:54
Werkov pushed a commit to Werkov/systemd that referenced this pull request Mar 9, 2018
Previous code was using the basename(id->fragment_path) which returned
incorrect result if the unit was an instance.

For example, assuming that no instances of "template" have been created so far:

 $ systemctl enable template@1
 Created symlink from /etc/systemd/system/multi-user.target.wants/[email protected] to /usr/lib/systemd/system/[email protected].

 $ systemctl is-enabled [email protected]
 disabled

 $ systemctl status [email protected][email protected] - openQA Worker systemd#3
    Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled; vendor preset: disabled)
    [...]

Here the unit file states reported by "status" and "is-enabled" were different.

(cherry picked from commit 9ea3a0e)

[fbui: fixes bsc#1075801]
SergioAtSUSE pushed a commit to SergioAtSUSE/systemd_systemd that referenced this pull request Jun 7, 2018
Previous code was using the basename(id->fragment_path) which returned
incorrect result if the unit was an instance.

For example, assuming that no instances of "template" have been created so far:

 $ systemctl enable template@1
 Created symlink from /etc/systemd/system/multi-user.target.wants/[email protected] to /usr/lib/systemd/system/[email protected].

 $ systemctl is-enabled [email protected]
 disabled

 $ systemctl status [email protected][email protected] - openQA Worker systemd#3
    Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled; vendor preset: disabled)
    [...]

Here the unit file states reported by "status" and "is-enabled" were different.

(cherry picked from commit 9ea3a0e)

[fbui: fixes bsc#1075801]
Werkov pushed a commit to Werkov/systemd that referenced this pull request Nov 27, 2018
Previous code was using the basename(id->fragment_path) which returned
incorrect result if the unit was an instance.

For example, assuming that no instances of "template" have been created so far:

 $ systemctl enable template@1
 Created symlink from /etc/systemd/system/multi-user.target.wants/[email protected] to /usr/lib/systemd/system/[email protected].

 $ systemctl is-enabled [email protected]
 disabled

 $ systemctl status [email protected][email protected] - openQA Worker systemd#3
    Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled; vendor preset: disabled)
    [...]

Here the unit file states reported by "status" and "is-enabled" were different.

(cherry picked from commit 9ea3a0e)

[fbui: fixes bsc#1075801]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants