Bug 1287161 - systemctl preset claims that unit file have no [Install] section
systemctl preset claims that unit file have no [Install] section
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
24
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-01 11:11 EST by Yu Watanabe
Modified: 2016-11-03 23:32 EDT (History)
6 users (show)

See Also:
Fixed In Version: systemd-232-1.fc26
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 23:32:28 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yu Watanabe 2015-12-01 11:11:54 EST
Description of problem:

Even if a unit file has [Install] section, systemctl preset command claims the unit file has no [Install] section. Like as follows:

# systemctl preset postfix.service
The unit files have no [Install] section. They are not meant to be enabled
using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).


Version-Release number of selected component (if applicable):

systemd-228-5.gite35a787.fc24.x86_64

How reproducible:

Always.

Steps to Reproduce:
1. Run systemctl preset xxx.service
2.
3.

Actual results:

The command outputs the unnecessary error message.

Expected results:

Should not output such error messages if unit files have [Install] section.

Additional info:
Comment 1 Yu Watanabe 2015-12-01 11:20:36 EST
The command 'systemctl preset' itself seems to work correctly. So, I think the severity of this bug is low.

# systemctl enable postfix.service
Created symlink from /etc/systemd/system/multi-user.target.wants/postfix.service to /usr/lib/systemd/system/postfix.service.

# systemctl preset postfix.service
Removed symlink /etc/systemd/system/multi-user.target.wants/postfix.service.
The unit files have no [Install] section. They are not meant to be enabled
using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).

# systemctl status postfix.service
● postfix.service - Postfix Mail Transport Agent
   Loaded: loaded (/usr/lib/systemd/system/postfix.service; disabled; vendor preset: disabled)
   Active: inactive (dead) since Wed 2015-12-02 00:55:53 JST; 19min ago
 Main PID: 1685 (code=killed, signal=TERM)
Comment 2 Jan Kurik 2016-02-24 09:04:31 EST
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Note You need to log in before you can comment on or make changes to this bug.