refactor: check() in systemd modules

Refactoring require_binaries in check() for systemd modules
master
Jóhann B. Guðmundsson 2021-04-22 19:29:13 +00:00 committed by Harald Hoyer
parent 8a51ee1fa6
commit 2f217abdb3
5 changed files with 20 additions and 10 deletions

View File

@ -6,8 +6,10 @@
check() { check() {


# If the binary(s) requirements are not fulfilled the module can't be installed # If the binary(s) requirements are not fulfilled the module can't be installed
require_binaries systemd-ask-password || return 1 require_binaries \
require_binaries systemd-tty-ask-password-agent || return 1 systemd-ask-password \
systemd-tty-ask-password-agent \
|| return 1


# Return 255 to only include the module, if another module requires it. # Return 255 to only include the module, if another module requires it.
return 255 return 255

View File

@ -6,8 +6,10 @@
check() { check() {


# If the binary(s) requirements are not fulfilled the module can't be installed # If the binary(s) requirements are not fulfilled the module can't be installed
require_binaries coredumpctl || return 1 require_binaries \
require_binaries "$systemdutildir"/systemd-coredump || return 1 coredumpctl \
"$systemdutildir"/systemd-coredump \
|| return 1


# Return 255 to only include the module, if another module requires it. # Return 255 to only include the module, if another module requires it.
return 255 return 255

View File

@ -6,8 +6,10 @@
check() { check() {


# If the binary(s) requirements are not fulfilled the module can't be installed. # If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries hostnamectl || return 1 require_binaries \
require_binaries "$systemdutildir"/systemd-hostnamed || return 1 hostnamectl \
"$systemdutildir"/systemd-hostnamed \
|| return 1


# Return 255 to only include the module, if another module requires it. # Return 255 to only include the module, if another module requires it.
return 255 return 255

View File

@ -6,8 +6,10 @@
check() { check() {


# If the binary(s) requirements are not fulfilled the module can't be installed # If the binary(s) requirements are not fulfilled the module can't be installed
require_binaries resolvectl || return 1 require_binaries \
require_binaries "$systemdutildir"/systemd-resolved || return 1 resolvectl \
"$systemdutildir"/systemd-resolved \
|| return 1


# Return 255 to only include the module, if another module requires it. # Return 255 to only include the module, if another module requires it.
return 255 return 255

View File

@ -6,8 +6,10 @@
check() { check() {


# If the binary(s) requirements are not fulfilled the module can't be installed # If the binary(s) requirements are not fulfilled the module can't be installed
require_binaries "$systemdutildir"/systemd-timesyncd || return 1 require_binaries \
require_binaries "$systemdutildir"/systemd-time-wait-sync || return 1 "$systemdutildir"/systemd-timesyncd \
"$systemdutildir"/systemd-time-wait-sync \
|| return 1


# Return 255 to only include the module, if another module requires it. # Return 255 to only include the module, if another module requires it.
return 255 return 255