Skip to content

Commit

Permalink
Allow to specify reboot packages on command line
Browse files Browse the repository at this point in the history
  • Loading branch information
rnestler committed Sep 25, 2022
1 parent 47dd0c1 commit afc776d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ fn parse_xdpyinfo_output(xdpyinfo_output: &str) -> Option<&str> {
)]
struct Args {
/// Disable desktop notification
#[structopt(long)]
#[clap(long)]
disable_notification: bool,

/// Comma separated list of packages were we should reboot after an upgrade.
#[clap(long, use_delimiter = true)]
reboot_packages: Vec<String>,
}

fn main() {
Expand All @@ -51,7 +55,7 @@ fn main() {
let session_info = session::SessionInfo::from_utmp();
if let Ok(session_info) = session_info {
let critical_packages_checker =
CriticalPackagesCheck::new(vec!["systemd".to_owned()], session_info, db);
CriticalPackagesCheck::new(args.reboot_packages, session_info, db);
checkers.push(Box::new(critical_packages_checker));
}

Expand Down

0 comments on commit afc776d

Please sign in to comment.