@joalif, one thing I noticed, that isn't important for this SRU, is that
the !ENABLE_LOGIND case still has a log message indicating shutdown will
happen immediately, i.e.:


int logind_schedule_shutdown(void) {                                            
                                                                                
                                                                                
                              
                                                                                
                                                                                
                                                                                
                              
#if ENABLE_LOGIND                                                               
                                                                                
                                                                                
                              
...stuff...
#else                                                                           
                                                                                
                                                                                
                              
        return log_error_errno(SYNTHETIC_ERRNO(ENOSYS),                         
                                                                                
                                                                                
                              
                               "Cannot schedule shutdown without logind 
support, proceeding with immediate shutdown.");                                 
                                                                                
                                      
#endif                                                                          
                                                                                
                                                                                
                              
}

however, since the caller has been changed to return error instead of
immediate reboot, maybe that message should be changed as well. I'd
actually suggest that both messages in this function, that state what
will happen next but rely on the caller to actually do what the log
states, are in the wrong place, and the *calling* function should log an
appropriate message about what it's doing next instead of this function.

Doesn't matter for this though since we do define ENABLE_LOGIND for our
builds, just a suggestion if you want to send a patch to debian :)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1911187

Title:
  scheduled reboot reboots immediately if dbus or logind is not
  available

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1911187/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to