fix: bootpkg only as root
This commit is contained in:
parent
e2154bda29
commit
b2cd8986d0
1 changed files with 8 additions and 0 deletions
|
@ -15,6 +15,14 @@ mod args;
|
|||
mod prelude;
|
||||
|
||||
fn main() {
|
||||
#[cfg(not(debug_assertions))]
|
||||
{
|
||||
if unsafe { libc::getuid() } != 0 {
|
||||
println!("bootpkg must be run as root.");
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
let args = Args::from(env::args().collect::<Vec<String>>()[1..].to_owned());
|
||||
match args.command {
|
||||
Command::Strap => {
|
||||
|
|
Loading…
Reference in a new issue