Am Mon, 10 Apr 2017 09:27:57 +0200
schrieb Raffaele Belardi <raffaele.bela...@st.com>:

> After 10+ years of LXDE/OpenRC I decided to give Gnome/systemd a try.
> 
> 1. With OpenRC I used hdparm to put an external USB disk to sleep:
> 
> $ cat /etc/conf.d/hdparm
> sdb_args="-S24"
> 
> Looks like systemd does not provide a unit file for hdparm yet,
> right? If so I suppose I'll have to write my own.
> In general I suppose the same holds for everything that was
> under /etc/local.d/
> 
> 2. Which OpenRC-related packages can I unmerge?
> - sys-apps/sysvinit
> - sys-apps/openrc
> - app-admin/sysklogd
> - cron/anacron after transition to systemd timers
> - sys-apps/debianutils provides savelog functionality also provided
> by systemd but also installkernel so I shall not remove it
> - others?

I've put the hdparm stuff in /etc/local.d:

$ cat /etc/local.d/hdparm.start
#!/bin/sh

for device in /sys/bus/scsi/devices/[012345]:0:0:0/block/*; do
        hdparm -W1B254S241M254 /dev/$(basename $device)
done

Make it chmod +x.

Then install the gentoo integration packet for systemd which creates
the proper units on the fly during boot:

$ emerge -a sys-apps/gentoo-systemd-integration

After restart, you should see units started for each local.d script.
It's implemented as a systemd generator. To see how it works, look at
"equery f gentoo-systemd-integration" and have a look at the generator
files.

-- 
Regards,
Kai

Replies to list-only preferred.


Reply via email to