SkypLabs / my-qubes-os-formula

SaltStack formula to set up my personal Qubes OS configuration
https://github.com/SkypLabs/my-qubes-os-formula/wiki
Other
18 stars 3 forks source link

Install powertop into dom0 and enable autotune service at boot. #2

Closed tlaurion closed 6 years ago

tlaurion commented 6 years ago

Install with sudo qubesctl state.sls my-config.powertop

tlaurion commented 6 years ago

Because if set like that, the formula fails. This is why I check for dead, which means enabled but not running ( any other state then running)

Le mar. 10 avr. 2018 13:05, Skyper notifications@github.com a écrit :

@SkypLabs commented on this pull request.

In my-config/dom0-powertop.sls https://github.com/SkypLabs/my-qubes-os-formula/pull/2#discussion_r180497461 :

@@ -0,0 +1,10 @@ +# -- coding: utf-8 -- +# vim: set syntax=yaml ts=2 sw=2 sts=2 et : + +dom0:

  • pkg.installed:
    • name: powertop
    • fromrepo: fedora +powertop:
  • service.dead:

Powertop is not a service, but oneshoot.

Indeed, I forgot this. Consequently, why not using service.enabled?

I suggest you to rewrite the state this way:

powertop: pkg.installed:

  • fromrepo: fedora service.enabled: []

Then, I will accept your changes.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SkypLabs/my-qubes-os-formula/pull/2#discussion_r180497461, or mute the thread https://github.com/notifications/unsubscribe-auth/AAygsk3M5u0EX71VrczFn9U8G3Y9SATIks5tnOZVgaJpZM4TKK_A .

SkypLabs commented 6 years ago

Because if set like that, the formula fails. This is why I check for dead, which means enabled but not running ( any other state then running)

It works fine for me when using service.enabled (from dom0):

[skyper@dom0 ~]$ sudo systemctl status powertop
● powertop.service - PowerTOP autotuner
   Loaded: loaded (/usr/lib/systemd/system/powertop.service; enabled; vendor preset: disabled)
   Active: inactive (dead)

As you can see, the service is well enabled after executing the state as it is written in my comment. service.enabled doesn't care if the service is running or dead. It just enables it.

SkypLabs commented 6 years ago

Thanks again :+1: