Ubuntu 패키지 upgrade 이후 리부팅 여부 체크 메세지 확인
# cat /var/run/reboot-required
*** 시스템을 다시 시작해야 합니다 ***
※ 패키지가 업데이트하고나서 리부팅이 필요할 경우 시스템은 /var/run/reboot-required 파일을 생성
# cat /var/run/reboot-required.pkgs
linux-image-4.4.0-59-generic
linux-base
linux-base
확인)
# cat /var/run/reboot-required
*** 시스템을 다시 시작해야 합니다 ***
*** 시스템을 다시 시작해야 합니다 ***
*** 시스템을 다시 시작해야 합니다 ***
example)
:: 패키지 업데이트 & 업그레이드 이후 /var/run/reboot-required 파일이 있을경우 리부팅
# apt-get update && apt-get -fy upgrade && [ -f /var/run/reboot-required ] && shutdown -r now