Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have some Ubuntu Server machines which I'd like to keep up-to-date, but not always if it requires a reboot.

Is there a way to tell if pending package updates require a reboot BEFORE installing the packages?

share|improve this question

1 Answer 1

just copy the snippet, put it in ~/bin and chmod +x it and you can check whenever you want.

#!/bin/bash
if [ -f /var/run/reboot-required ]; then
  echo 'You need to reboot'
fi
share|improve this answer
    
Good info, but perhaps I should have been more clear -- I want to find out before I install them if I'll need to reboot afterwards. Clarified question –  HDave Apr 1 '13 at 3:03
    
WOW, I'm gonna follow this one because i haven't thought about that question before... Please let me know if you find an answer before me. –  Scott Goodgame Apr 1 '13 at 23:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.