summaryrefslogtreecommitdiffstats
path: root/crates/core/tedge/src/system_services/command_builder.rs
diff options
context:
space:
mode:
authorRina Fujino <18257209+rina23q@users.noreply.github.com>2022-01-10 17:57:41 +0100
committerGitHub <noreply@github.com>2022-01-10 17:57:41 +0100
commit3ab4cf779ebacafd5990285d07ccfe03bebaea03 (patch)
treeae8f06bc774a39f2575abf933cb92a04fc710a79 /crates/core/tedge/src/system_services/command_builder.rs
parent9c4dee566f25a7a3a2b2548a03d0c4a4bf65b66e (diff)
#639 Remove the dependency on systemd (#729)
* The purpose of this change is to get rid of the hard-coded dependencies on systemd from tedge connect/disconnect, to allow users to use other system managers, e.g. OpenRC, initd, etc.. * If /etc/tedge/system.toml exists, tedge connect/disconnect uses the service manager defined in the file. * If the file is not given by user, tedge connect/disconnect uses /bin/systemctl as the service manager. (the same behaviour as we have it so far) * Delete old service implementation files for BSD, OpenRC, systemd, and NULL. * Add system.toml example files for BSD and OpenRC. * Add a reference guide to explain the format of system.toml configuration file. Signed-off-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
Diffstat (limited to 'crates/core/tedge/src/system_services/command_builder.rs')
-rw-r--r--crates/core/tedge/src/system_services/command_builder.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/core/tedge/src/system_services/command_builder.rs b/crates/core/tedge/src/system_services/command_builder.rs
index 9d9e8ffb..bb66f313 100644
--- a/crates/core/tedge/src/system_services/command_builder.rs
+++ b/crates/core/tedge/src/system_services/command_builder.rs
@@ -13,8 +13,12 @@ impl CommandBuilder {
}
}
- pub fn arg(mut self, arg: impl AsRef<OsStr>) -> CommandBuilder {
- self.command.arg(arg);
+ pub fn args<I, S>(mut self, args: I) -> CommandBuilder
+ where
+ I: IntoIterator<Item = S>,
+ S: AsRef<OsStr>,
+ {
+ self.command.args(args);
self
}