From d114acb6103706e56f7d2090569c354987033d7e Mon Sep 17 00:00:00 2001 From: namilsk Date: Sat, 10 Jan 2026 16:17:21 +0300 Subject: Fixed parts naming --- Cargo.toml | 2 +- README.md | 8 ++++---- vegilctl/Cargo.toml | 8 -------- vegilctl/src/args_dispatcher.rs | 0 vegilctl/src/main.rs | 40 ---------------------------------------- vigilctl/Cargo.toml | 8 ++++++++ vigilctl/src/args_dispatcher.rs | 0 vigilctl/src/main.rs | 40 ++++++++++++++++++++++++++++++++++++++++ 8 files changed, 53 insertions(+), 53 deletions(-) delete mode 100644 vegilctl/Cargo.toml delete mode 100644 vegilctl/src/args_dispatcher.rs delete mode 100644 vegilctl/src/main.rs create mode 100644 vigilctl/Cargo.toml create mode 100644 vigilctl/src/args_dispatcher.rs create mode 100644 vigilctl/src/main.rs diff --git a/Cargo.toml b/Cargo.toml index 8c9be6f..4c92673 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["init", "vegilctl"] +members = ["init", "vigilctl"] resolver = "3" [workspace.package] diff --git a/README.md b/README.md index 70a87a6..7fff908 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,14 @@ The development is based on the Unix philosophy: - **"The UNIX system is characterized by: [...] A unified view of I/O, and a hierarchical file system. A small number of kernel primitives, augmented by a rich set of user-level tools."** - Ritchie & Thompson, «The UNIX Time-Sharing System» -`vegil` strives to be indestructible, something that even in the case of most errors will boot you into the system. If not, then go to rescue mode with all the tools installed. +`vigil` strives to be indestructible, something that even in the case of most errors will boot you into the system. If not, then go to rescue mode with all the tools installed. # Development -This repo contains the source code of the `init` executable itself and `vegilctl`, for managing the initialization system. +This repo contains the source code of the `init` executable itself and `vigilctl`, for managing the initialization system. At the moment, the init binary itself is a priority for development. # Usage -All operations are logged and start with `*` and looks like `* `, it has three colors: +All operations are logged and start with `*` and looks like ` `, it has three colors: - Red (`\x1b[31m`) - This means that a mission-critical operation has failed, and you will most likely go into rescue mode. - Yellow (`\x1b[33m`) - It means that the operation specified by the user in the configuration or not critical has failed, the system will start, but it is better to pay attention to it. -- Green (`\x1b[32m`) - Everything is in order. \ No newline at end of file +- Green (`\x1b[32m`) - Everything is in order. diff --git a/vegilctl/Cargo.toml b/vegilctl/Cargo.toml deleted file mode 100644 index 0a89458..0000000 --- a/vegilctl/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -name = "vegilctl" -version = "0.1.0" -edition = "2024" -description = "Vegil init user control." - -[dependencies] -clap = { version = "4.5.53", features = [ "derive"]} diff --git a/vegilctl/src/args_dispatcher.rs b/vegilctl/src/args_dispatcher.rs deleted file mode 100644 index e69de29..0000000 diff --git a/vegilctl/src/main.rs b/vegilctl/src/main.rs deleted file mode 100644 index 08ff37c..0000000 --- a/vegilctl/src/main.rs +++ /dev/null @@ -1,40 +0,0 @@ -use clap::{Parser, Subcommand}; - -#[derive(Subcommand, Clone,Debug)] -enum Command { - /// Check Service Status - Status { of: String }, - /// Stop Specified Service - Stop { service: String }, - /// Start Specified Service - Start { service: String }, - /// Start Service after system initialization (Add Service symlink to Vigil service startup - /// list) - Enable { service: String }, - /// Remove Service From Service initialization list - Disable { service: String }, - /// Power Management Commands - #[command(subcommand)] - Power(PowerCommand) -} -#[derive(Subcommand, Clone, Debug)] -enum PowerCommand { - /// Reboot System - Reboot, - /// Poweroff System - Poweroff, - /// Halt - Halt -} -#[derive(Parser)] -#[command(name = "vigilctl")] -#[command(about = "Vigil control manager")] -struct Cli { - #[command(subcommand)] - command: Command, -} -fn main() { - let args = Cli::parse(); - - println!("command: {:?}", args.command); -} diff --git a/vigilctl/Cargo.toml b/vigilctl/Cargo.toml new file mode 100644 index 0000000..0a89458 --- /dev/null +++ b/vigilctl/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "vegilctl" +version = "0.1.0" +edition = "2024" +description = "Vegil init user control." + +[dependencies] +clap = { version = "4.5.53", features = [ "derive"]} diff --git a/vigilctl/src/args_dispatcher.rs b/vigilctl/src/args_dispatcher.rs new file mode 100644 index 0000000..e69de29 diff --git a/vigilctl/src/main.rs b/vigilctl/src/main.rs new file mode 100644 index 0000000..08ff37c --- /dev/null +++ b/vigilctl/src/main.rs @@ -0,0 +1,40 @@ +use clap::{Parser, Subcommand}; + +#[derive(Subcommand, Clone,Debug)] +enum Command { + /// Check Service Status + Status { of: String }, + /// Stop Specified Service + Stop { service: String }, + /// Start Specified Service + Start { service: String }, + /// Start Service after system initialization (Add Service symlink to Vigil service startup + /// list) + Enable { service: String }, + /// Remove Service From Service initialization list + Disable { service: String }, + /// Power Management Commands + #[command(subcommand)] + Power(PowerCommand) +} +#[derive(Subcommand, Clone, Debug)] +enum PowerCommand { + /// Reboot System + Reboot, + /// Poweroff System + Poweroff, + /// Halt + Halt +} +#[derive(Parser)] +#[command(name = "vigilctl")] +#[command(about = "Vigil control manager")] +struct Cli { + #[command(subcommand)] + command: Command, +} +fn main() { + let args = Cli::parse(); + + println!("command: {:?}", args.command); +} -- cgit v1.2.3