Bug 678280 - ups service start too early
Summary: ups service start too early
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: nut
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-17 12:48 UTC by Sandro Bonazzola
Modified: 2012-03-26 07:03 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-26 07:03:20 UTC
Type: ---


Attachments (Terms of Use)

Description Sandro Bonazzola 2011-02-17 12:48:22 UTC
Description of problem:
On a LAN server under UPS, the UPS is connected using the network adapter and configured for using DHCP.
When the server starts the ups service is started with chkconfig priority 26, before any DHCP service could be started:
- dnsmasq starts with priority 49
- dhcpd starts with priority 65

In order to allow using DHCP on UPS, the dhcp service should be started before the ups service.

Version-Release number of selected component (if applicable):
dnsmasq-2.52-1.fc13.i686
nut-2.6.0-1.fc14.i686
dhcp-4.2.0-19.P2.fc14.i686


Actual results:
ups service start and fails contacting the ups because its IP address is not yes assigned

Expected results:
ups service start and doesn't fail contacting the ups.

Comment 1 Michal Hlavinka 2012-03-26 07:03:20 UTC
Fedora 14 is no longer supported.
If you want to get this working in Fedora 15+, you have to create new file /etc/systemd/system/nut-driver.service and put there:
.include /lib/systemd/system/nut-driver.service
[Unit]
After=dhcpd.service

What it does:
- user configuration goes to /etc/systemd prefix, compared with rpm shipped files, that goes to /lib/systemd (Fedora 15, 16) or /usr/lib/systemd (Fedora 17+).
- it includes content of original service file
- in section [Unit] it adds option After=dhcpd.service
-> compared with original configuration, your nut driver will start after dhcpd service (if dhcpd service is not configurat to start on boot, it will start immediately without starting dhcpd). The /etc/systemd/* configuration won't get overwritten during rpm update.


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