1 |
Am Mon, 10 Apr 2017 09:27:57 +0200 |
2 |
schrieb Raffaele Belardi <raffaele.belardi@××.com>: |
3 |
|
4 |
> After 10+ years of LXDE/OpenRC I decided to give Gnome/systemd a try. |
5 |
> |
6 |
> 1. With OpenRC I used hdparm to put an external USB disk to sleep: |
7 |
> |
8 |
> $ cat /etc/conf.d/hdparm |
9 |
> sdb_args="-S24" |
10 |
> |
11 |
> Looks like systemd does not provide a unit file for hdparm yet, |
12 |
> right? If so I suppose I'll have to write my own. |
13 |
> In general I suppose the same holds for everything that was |
14 |
> under /etc/local.d/ |
15 |
> |
16 |
> 2. Which OpenRC-related packages can I unmerge? |
17 |
> - sys-apps/sysvinit |
18 |
> - sys-apps/openrc |
19 |
> - app-admin/sysklogd |
20 |
> - cron/anacron after transition to systemd timers |
21 |
> - sys-apps/debianutils provides savelog functionality also provided |
22 |
> by systemd but also installkernel so I shall not remove it |
23 |
> - others? |
24 |
|
25 |
I've put the hdparm stuff in /etc/local.d: |
26 |
|
27 |
$ cat /etc/local.d/hdparm.start |
28 |
#!/bin/sh |
29 |
|
30 |
for device in /sys/bus/scsi/devices/[012345]:0:0:0/block/*; do |
31 |
hdparm -W1B254S241M254 /dev/$(basename $device) |
32 |
done |
33 |
|
34 |
Make it chmod +x. |
35 |
|
36 |
Then install the gentoo integration packet for systemd which creates |
37 |
the proper units on the fly during boot: |
38 |
|
39 |
$ emerge -a sys-apps/gentoo-systemd-integration |
40 |
|
41 |
After restart, you should see units started for each local.d script. |
42 |
It's implemented as a systemd generator. To see how it works, look at |
43 |
"equery f gentoo-systemd-integration" and have a look at the generator |
44 |
files. |
45 |
|
46 |
-- |
47 |
Regards, |
48 |
Kai |
49 |
|
50 |
Replies to list-only preferred. |