Re: [systemd-devel] Restart instantiated services after suspend

2013-11-25 Thread Lennart Poettering
On Sat, 23.11.13 18:51, Marcos Felipe Rasia de Mello (marcos...@gmail.com) wrote: > > 2013/11/20 Lennart Poettering : > > On Tue, 19.11.13 14:18, Marcos Felipe Rasia de Mello (marcos...@gmail.com) > > wrote: > > > >> Hi folks, > >> > >> I am trying to disable HDDs power management in a systemd

Re: [systemd-devel] Restart instantiated services after suspend

2013-11-23 Thread Marcos Felipe Rasia de Mello
2013/11/20 Lennart Poettering : > On Tue, 19.11.13 14:18, Marcos Felipe Rasia de Mello (marcos...@gmail.com) > wrote: > >> Hi folks, >> >> I am trying to disable HDDs power management in a systemd way (aka no >> shell scripts :) >> >> /etc/udev/rules.d/99-hdparm.rules >> >> SUBSYSTEM=="block", KER

Re: [systemd-devel] Restart instantiated services after suspend

2013-11-20 Thread Lennart Poettering
On Tue, 19.11.13 14:18, Marcos Felipe Rasia de Mello (marcos...@gmail.com) wrote: > Hi folks, > > I am trying to disable HDDs power management in a systemd way (aka no > shell scripts :) > > /etc/udev/rules.d/99-hdparm.rules > > SUBSYSTEM=="block", KERNEL=="sd*", ATTR{removable}=="0", > TAG+="

Re: [systemd-devel] Restart instantiated services after suspend

2013-11-19 Thread Greg KH
On Tue, Nov 19, 2013 at 03:47:39PM -0200, Marcos Felipe Rasia de Mello wrote: > 2013/11/19 Cristian Rodríguez : > > El 19/11/13 13:18, Marcos Felipe Rasia de Mello escribió: > > > >> It works fine, but after the machine wakes up from suspend, I need > >> that all hdparm@.service be run again. Is th

Re: [systemd-devel] Restart instantiated services after suspend

2013-11-19 Thread Marcos Felipe Rasia de Mello
2013/11/19 Cristian Rodríguez : > El 19/11/13 13:18, Marcos Felipe Rasia de Mello escribió: > >> It works fine, but after the machine wakes up from suspend, I need >> that all hdparm@.service be run again. Is there a way to accomplish > > You are looking at the wrong place.. if you disable the HDD

Re: [systemd-devel] Restart instantiated services after suspend

2013-11-19 Thread David Timothy Strauss
On Wed, Nov 20, 2013 at 3:00 AM, Marcos Felipe Rasia de Mello wrote: > In my first attempts, I forgot to install hdparm. ;) Shouldn't you only drop the rules and service with installation of hdparm, then? ___ systemd-devel mailing list systemd-devel@lis

Re: [systemd-devel] Restart instantiated services after suspend

2013-11-19 Thread Marcos Felipe Rasia de Mello
2013/11/19 Tom Gundersen : > On Tue, Nov 19, 2013 at 5:18 PM, Marcos Felipe Rasia de Mello > wrote: >> Hi folks, >> >> I am trying to disable HDDs power management in a systemd way (aka no >> shell scripts :) >> >> /etc/udev/rules.d/99-hdparm.rules >> >> SUBSYSTEM=="block", KERNEL=="sd*", ATTR{rem

Re: [systemd-devel] Restart instantiated services after suspend

2013-11-19 Thread Marcos Felipe Rasia de Mello
2013/11/19 David Timothy Strauss : > On Wed, Nov 20, 2013 at 2:18 AM, Marcos Felipe Rasia de Mello > wrote: >> ConditionFileIsExecutable=/usr/sbin/hdparm > > It seems sketchy to me to put the executable in ExecStart into > ConditionFileIsExecutable. Is it supposed to fail silently when hdparm > is

Re: [systemd-devel] Restart instantiated services after suspend

2013-11-19 Thread Cristian Rodríguez
El 19/11/13 13:18, Marcos Felipe Rasia de Mello escribió: > It works fine, but after the machine wakes up from suspend, I need > that all hdparm@.service be run again. Is there a way to accomplish You are looking at the wrong place.. if you disable the HDD power managment, then suspend but after

Re: [systemd-devel] Restart instantiated services after suspend

2013-11-19 Thread David Timothy Strauss
On Wed, Nov 20, 2013 at 2:18 AM, Marcos Felipe Rasia de Mello wrote: > ConditionFileIsExecutable=/usr/sbin/hdparm It seems sketchy to me to put the executable in ExecStart into ConditionFileIsExecutable. Is it supposed to fail silently when hdparm is missing? _

Re: [systemd-devel] Restart instantiated services after suspend

2013-11-19 Thread Tom Gundersen
On Tue, Nov 19, 2013 at 5:18 PM, Marcos Felipe Rasia de Mello wrote: > Hi folks, > > I am trying to disable HDDs power management in a systemd way (aka no > shell scripts :) > > /etc/udev/rules.d/99-hdparm.rules > > SUBSYSTEM=="block", KERNEL=="sd*", ATTR{removable}=="0", > TAG+="systemd", ENV{SYS

[systemd-devel] Restart instantiated services after suspend

2013-11-19 Thread Marcos Felipe Rasia de Mello
Hi folks, I am trying to disable HDDs power management in a systemd way (aka no shell scripts :) /etc/udev/rules.d/99-hdparm.rules SUBSYSTEM=="block", KERNEL=="sd*", ATTR{removable}=="0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="hdparm@%k.service" /etc/systemd/system/hdparm@.service [Unit] Descri