mirror of
https://github.com/Forza-tng/dm-cache
synced 2024-12-17 19:54:34 +00:00
Update openrc/dmcache.initd
Move blockdev --getsz to checkconfig()
This commit is contained in:
parent
ffb84bbc8c
commit
16fe60eb45
@ -16,8 +16,6 @@ extra_started_commands="suspend resume cleaner"
|
||||
: "${cachepolicy:="default"}"
|
||||
: "${cachepolicyargs:=0}"
|
||||
: "${readahead:="auto"}"
|
||||
# dm-cache requires the origindev size in sectors.
|
||||
: "${originsize:="$(/sbin/blockdev --getsz "${origindev}")"}"
|
||||
|
||||
depend() {
|
||||
need dev modules
|
||||
@ -42,6 +40,8 @@ checkconfig() {
|
||||
eerror "dmname not set!"
|
||||
return 1
|
||||
fi
|
||||
# dm-cache requires the origindev size in sectors.
|
||||
: "${originsize:="$(/sbin/blockdev --getsz "${origindev}")"}"
|
||||
}
|
||||
|
||||
start() {
|
||||
|
Loading…
Reference in New Issue
Block a user