style: rustfmt
This commit is contained in:
parent
14c2c6d4a5
commit
dce97f4826
1 changed files with 9 additions and 8 deletions
|
|
@ -331,9 +331,7 @@ async fn exec(req: PrivRequest, writer: &mut OwnedWriteHalf) -> Result<(String,
|
|||
upgrade_agent_subvolume(agent_name).await
|
||||
}
|
||||
|
||||
PrivRequest::SyncAgentTmpfiles { ref agents } => {
|
||||
sync_agent_tmpfiles(agents).await
|
||||
}
|
||||
PrivRequest::SyncAgentTmpfiles { ref agents } => sync_agent_tmpfiles(agents).await,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1546,18 +1544,21 @@ async fn sync_agent_tmpfiles(agents: &[String]) -> Result<(String, String)> {
|
|||
}
|
||||
|
||||
// Build tmpfiles.d content. Root dirs first, then per-agent.
|
||||
let mut content = String::from(
|
||||
"# managed by hive-c0re — do not edit (regenerated on spawn/destroy)\n",
|
||||
);
|
||||
let mut content =
|
||||
String::from("# managed by hive-c0re — do not edit (regenerated on spawn/destroy)\n");
|
||||
// Parent dirs — created with permissive mode so hive-c0re can make subdirs.
|
||||
// /run/hyperhive itself is also a RuntimeDirectory of hive-c0re.service; the
|
||||
// tmpfiles.d entry here ensures it exists before hive-c0re starts (boot race).
|
||||
content.push_str("d /run/hyperhive 0750 hive-core hive-core -\n");
|
||||
content.push_str(&format!("d {AGENT_RUNTIME_ROOT} 0755 hive-core hive-core -\n"));
|
||||
content.push_str(&format!(
|
||||
"d {AGENT_RUNTIME_ROOT} 0755 hive-core hive-core -\n"
|
||||
));
|
||||
content.push_str(&format!("d {SOCKET_DIR_ROOT} 0755 root root -\n"));
|
||||
// Per-agent dirs.
|
||||
for name in agents {
|
||||
content.push_str(&format!("d {AGENT_RUNTIME_ROOT}/{name} 0755 hive-core hive-core -\n"));
|
||||
content.push_str(&format!(
|
||||
"d {AGENT_RUNTIME_ROOT}/{name} 0755 hive-core hive-core -\n"
|
||||
));
|
||||
// 0777: agent harness (non-root uid) must bind sockets here.
|
||||
// `d` adjusts mode/owner on existing dirs; world-writable matches
|
||||
// the chmod_socket_dir(0o777) fallback so a runtime re-sync doesn't
|
||||
|
|
|
|||
Loading…
Reference in a new issue