How Can I Write to Console During Shutdown?

I am trying to prevent the user from shutting down or rebooting without physically removing a flash card from the machine. To do that, I have written a SystemD service, removeflash.service: [Unit] Description=Prompt user to remove flash card [Service] ExecStop=/usr/lib/systemd/flashshutdown.sh Type=oneshot RemainAfterExit=yes [Install] WantedBy=multi-user.target Requires=rsyslog.service The flashshutdown.sh is a bash script, as follows: #! /bin/bash…

Details

Can’t get compton/picom to run with i3 manjaro (community version)

Here is what I get when I execute ‘picom’: [ 03/01/20 15:24:08.887 parse_config_libconfig WARN ] Option `no-dock-shadow` is deprecated, and will be removed. Please use the wintype option `shadow` of `dock` instead. [ 03/01/20 15:24:08.887 parse_config_libconfig WARN ] vsync option will take a boolean from now on. “none” is interpreted as “false” for compatibility, but…

Details

How to return a mapped future in an actix_web FromRequest trait implementation

I have the following implementation of the actix_web FromRequest trait: impl ::actix_web::FromRequest for Box<dyn SessionRepository> { type Error = ::actix_web::Error; type Future = ::futures::future::MapOk<::futures::future::Ready<Result<Self, Self::Error>>, ???>; type Config = (); fn from_request( req: &::actix_web::HttpRequest, payload: &mut actix_web::dev::Payload, ) -> Self::Future { RealSessionRepository::from_request(&req, payload).map_ok(|dep| Box::new(dep)) } } As the return type is an FnOnce, I cannot…

Details