[17/17] installer: Adjust BTRFS layout

Message ID 20240315191442.3951-18-stefan.schantl@ipfire.org
State Superseded
Headers
Series BTRFS support on IPFire 2.x (experimental) |

Commit Message

Stefan Schantl March 15, 2024, 7:14 p.m. UTC
  * Rename the fs root to @ to prevent name collision with home directory
  of user root.

* Add @root which contains the home directory of the root user
* Add @backup which will contains the created backups

Fixes #13608

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 src/installer/hw.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Patch

diff --git a/src/installer/hw.c b/src/installer/hw.c
index 26c473e9c..4110deccf 100644
--- a/src/installer/hw.c
+++ b/src/installer/hw.c
@@ -47,10 +47,12 @@ 
 // Array which contains the subvolumes which will be created when installing
 // IPFire on a BTRFS.
 const char* btrfs_subvolumes[8][2] = {
-	{"@root" ,"/"},
+	{"@" ,"/"},
 	{"@snapshots", "/.snapshots"},
 	{"@home", "/home"},
+	{"@root", "/root"},
 	{"@cache", "/var/cache"},
+	{"@backup", "/var/ipfire/backup"},
 	{"@lib", "/var/lib"},
 	{"@logs", "/var/log"},
 	{"@mails", "/var/mail"},