[Nut-upsdev] RFC: nut and systemd

Charles Lepple clepple at gmail.com
Wed Apr 20 12:22:53 UTC 2011


On Apr 18, 2011, at 10:36 AM, Michal Hlavinka wrote:

> Hi,
>
> you've probably heard about systemd already. In Fedora 15, it's
> used as default instead old SysV init system. While there is some
> backward compatibility layer, everything is going to be ported from
> /etc/init.d/<something> init scripts to systemd's service files
> /lib/systemd/system/<something>.service

Haven't heard of it (still trying to wrap my brain around whatever  
makes upstart and launchd better than SysV or BSD-style init scripts).  
I assume the following is the official home page?

    http://www.freedesktop.org/wiki/Software/systemd

> 4)The systemd's way:
> - 3 service files
> - one for upsd and one for upsmon. This means SERVER configuration
> from /etc/sysconfig/ups goes away.
> - two services configured by user (ups.service/nut.service=upsd, nut- 
> monitor.service=upsmon)
> - upsdrvctl as on demand service (started before upsd, stoped after  
> upsd)
>
>
>
> So, the question is: 3) or 4) ?


Short answer: sounds like 4.

Arnaud probably has some thoughts about migrating from /etc/sysconfig/ 
ups to something a little more generic across distributions  
(nut.conf?), but if systemd doesn't use a shell to parse things (which  
is understandable for performance), is there a good point during  
package installation/configuration where shell scripts can be executed  
to dynamically generate the systemd configuration files?

In .deb-based systems, the package manager automatically configures  
the packages as they are installed. An administrator can also  
reconfigure later, and if debconf is set up correctly, this is where  
package installation and configuration scripts can query for  
configuration options.

I know that RPM has a number of pre- and post-installation scripts,  
but is there something for configuration that does not require re- 
installation to change configuration? That way, slower shell scripts  
only execute once when the system administrator changes the  
configuration, and systemd would read those generated files.



More information about the Nut-upsdev mailing list