diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2024-01-28 16:29:06 +0100 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2024-01-28 16:29:06 +0100 |
commit | 178af2ede15e567307855f4003722ddd5e2d5b47 (patch) | |
tree | 34b9e8fc1808a3b39f08621f9c28ac77658760c2 /hbak/src | |
parent | a5805855c4f55e47d5f8fac14f30e2d7dd802a87 (diff) |
allow config-only initialization
Diffstat (limited to 'hbak/src')
-rw-r--r-- | hbak/src/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hbak/src/main.rs b/hbak/src/main.rs index 1516426..aab2a1f 100644 --- a/hbak/src/main.rs +++ b/hbak/src/main.rs @@ -20,6 +20,9 @@ struct Cli { enum Commands { /// Perform basic initialization of the local node. Init { + /// Initialize the configuration file but not the btrfs subvolumes. + #[arg(short = 'c', long = "config-only")] + config_only: bool, /// The device file the local btrfs file system is located at. device: String, /// The name to use for this node. @@ -106,12 +109,13 @@ fn logic() -> Result<()> { match cli.command { Commands::Init { + config_only, device, node_name, bind_addr, } => { let passphrase = rpassword::prompt_password("Enter new encryption passphrase: ")?; - system::init(device, bind_addr, node_name, passphrase)?; + system::init(config_only, device, bind_addr, node_name, passphrase)?; } Commands::Clean { backups } => { system::deinit(backups)?; |