Skip to content

Commit 66ef54e

Browse files
committed
Move some openrc deps/order into config file.
1 parent bafc143 commit 66ef54e

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# ChangeLog for zram-init:
22

3+
*zram-init-13.2:
4+
Martin Väth <martin at mvath.de>:
5+
- Rework openrc order/dependencies once more: Drop from the
6+
init-script the dependencies which might need to change in some
7+
typical setups. Put them instead into the config file with default
8+
for the (conjectured) most likely setup. Also add a verbose comment
9+
describing why it is there now and when/why/how to change it.
10+
See the discussion in https://github.com/vaeth/zram-init/issues/56
11+
312
*zram-init-13.1:
413
Xiangzhe (https://github.com/xz-de):
514
- Fix order for openrc

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ should go into `/lib/modprobe.d` or `/etc/modprobe.d` and be modified
3737
appropriately.
3838

3939
To use `LZ4` compression with zram your kernel needs to be compiled with
40-
a corresponding options. Depending on your kernel version this might be
40+
corresponding options. Depending on your kernel version this might be
4141

4242
- `CONFIG_ZRAM_LZ4_COMPRESS=y` (for older kernels)
4343
- `CONFIG_CRYPTO_LZ4=y` (for recent kernels)

openrc/conf.d/zram-init

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,19 @@ algo3=zstd
140140
labl3=zram_swap2
141141
uuid3=
142142
args3=
143+
144+
# The init-file does not enforce any order or dependency on bootmisc or
145+
# tmpfiles.setup, but very likely at least some order should be configured
146+
# in the config file.
147+
# Note that bootmisc and tmpfiles.setup typically both create /tmp and other
148+
# temporary directories (if they do no not exist already) but also some
149+
# subdirectories in it.
150+
# Depending on whether zram-init should be used to mount directories on
151+
# mount-points which are typically permanent or volatile (that is, removed
152+
# and recreated at # every restart) you might want to put these services
153+
# into rc_before or rc_after (or possibly even stronger rc_use or rc_depend).
154+
# If both is used, it might be addiotionally necessary to write a separate
155+
# init-file which creates a needed mount point and to rc_depend on it here.
156+
#rc_after=""
157+
#rc_depend=""
158+
rc_before="bootmisc tmpfiles.setup"

openrc/init.d/zram-init

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33

44
depend() {
55
need localmount swap
6-
before bootmisc
76
after modules
8-
use tmpfiles.setup
97
}
108

119
ZramInit() {

0 commit comments

Comments
 (0)