aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2023-03-21 18:57:42 +0100
committerHimbeerserverDE <himbeerserverde@gmail.com>2023-03-21 18:57:42 +0100
commitc688cb720192f955b77ea8e582debd0831e8a626 (patch)
treebc33fddc8f5917ef78980a2d8f6fb3accd63b95a
parentd8af9b21f095dce1f6ea84aa4bdadd313a12c031 (diff)
create /run mountpoint
-rw-r--r--src/main.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 32e6154..ccba973 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -525,6 +525,19 @@ fn write_root(
},
})?;
+ let run_inode = tree.add(SqsSourceFile {
+ path: PathBuf::from("/run"),
+ content: SqsSource {
+ data: SqsSourceData::Dir(Box::new(Vec::new().into_iter())),
+ uid: 0,
+ gid: 0,
+ mode: 0o755,
+ modified: 0,
+ xattrs: HashMap::new(),
+ flags: 0,
+ },
+ })?;
+
tree.add(SqsSourceFile {
path: PathBuf::from("/"),
content: SqsSource {
@@ -536,6 +549,7 @@ fn write_root(
(OsString::from("data"), data_inode),
(OsString::from("proc"), proc_inode),
(OsString::from("tmp"), tmp_inode),
+ (OsString::from("run"), run_inode),
]
.into_iter(),
)),
@@ -642,6 +656,19 @@ fn write_empty_root(partition: &mut StreamSlice<File>) -> anyhow::Result<()> {
},
})?;
+ let run_inode = tree.add(SqsSourceFile {
+ path: PathBuf::from("/run"),
+ content: SqsSource {
+ data: SqsSourceData::Dir(Box::new(Vec::new().into_iter())),
+ uid: 0,
+ gid: 0,
+ mode: 0o755,
+ modified: 0,
+ xattrs: HashMap::new(),
+ flags: 0,
+ },
+ })?;
+
tree.add(SqsSourceFile {
path: PathBuf::from("/"),
content: SqsSource {
@@ -653,6 +680,7 @@ fn write_empty_root(partition: &mut StreamSlice<File>) -> anyhow::Result<()> {
(OsString::from("data"), data_inode),
(OsString::from("proc"), proc_inode),
(OsString::from("tmp"), tmp_inode),
+ (OsString::from("run"), run_inode),
]
.into_iter(),
)),