kanit

Toy init system
Log | Files | Refs | README | LICENSE

flags.rs (1676B)


      1 xflags::xflags! {
      2     cmd kanit {
      3         /// Teardown and power-off the system.
      4         cmd poweroff {
      5             /// Force a power-off, not performing a teardown.
      6             optional -f, --force
      7         }
      8         /// Teardown and reboot the system.
      9         cmd reboot {
     10             /// Force a reboot, not performing a teardown.
     11             optional -f, --force
     12         }
     13         /// Teardown and halt the system.
     14         cmd halt {
     15             /// Force a halt, not performing a teardown.
     16             optional -f, --force
     17         }
     18         /// Teardown and reboot the system via kexec.
     19         cmd kexec {
     20             /// Force a reboot via kexec, not performing a teardown.
     21             optional -f, --force
     22         }
     23         /// Print unit startup times.
     24         cmd blame {
     25             // Print units sorted by startup time.
     26             optional -s, --sorted
     27         }
     28         /// Service related utilities.
     29        cmd service {
     30             /// Enable a unit at the specified runlevel.
     31             cmd enable {
     32                 /// The name of the unit.
     33                 required unit: String
     34                 /// The runlevel to enable the service at.
     35                 optional runlevel: String
     36             }
     37             /// Disable a unit at the specified runlevel.
     38             cmd disable {
     39                 /// The name of the unit.
     40                 required unit: String
     41                 /// The runlevel to enable the service at.
     42                 optional runlevel: String
     43             }
     44             /// List all enabled units.
     45             cmd list {
     46                 /// Shows the individual unit groups.
     47                 optional -p, --plan
     48             }
     49        }
     50     }
     51 }