Bug 1287161 - systemctl preset claims that unit file have no [Install] section
Summary: systemctl preset claims that unit file have no [Install] section
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-01 16:11 UTC by Yu Watanabe
Modified: 2016-11-04 03:32 UTC (History)
6 users (show)

Fixed In Version: systemd-232-1.fc26
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 03:32:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Yu Watanabe 2015-12-01 16:11:54 UTC
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 16:20:36 UTC
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 14:04:31 UTC
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.