Consequently, checkrestart is sometimes used as an audit tool to find outdated versions of libraries in use, particularly after security upgrades. Administrators should not, however, rely on its output completely (see BUGS below).
This script needs to run as root in order to obtain the information it needs for analysis.
The program will exit with error (1) if a non-root user tries to run it. Otherwise, it will always exit with error status 0.
Start it as user root without parameters:
# checkrestart
Found 20 processes using old versions of upgraded files
(15 distinct programs)
(14 distinct packages)
Of these, 12 seem to contain init scripts which can be used to restart them:
The following packages seem to have init scripts that could be used to restart them:
gpm:
3044 /usr/sbin/gpm
rpcbind:
2208 /sbin/rpcbind
bind9:
8463 /usr/sbin/named
openssh-server:
22124 /usr/sbin/sshd
ntp:
4078 /usr/sbin/ntpd
tftpd-hpa:
3417 /usr/sbin/in.tftpd
uptimed:
2704 /usr/sbin/uptimed
cron:
3019 /usr/sbin/cron
postfix:
22145 /usr/lib/postfix/qmgr
8892 /usr/lib/postfix/master
hddtemp:
3174 /usr/sbin/hddtemp
autofs:
2792 /usr/sbin/automount
openbsd-inetd:
3254 /usr/sbin/inetd
These are the init scripts:
service gpm restart
service rpcbind restart
service bind9 restart
service ssh restart
service ntp restart
service tftpd-hpa restart
service uptimed restart
service cron restart
service postfix restart
service hddtemp restart
service autofs restart
service openbsd-inetd restart
These processes do not seem to have an associated init script to restart them:
isc-dhcp-client:
3775 /sbin/dhclient
If you find a false positive in checkrestart please provide the following information when submitting a bug report:
lsof | egrep 'delete|DEL|path inode'
Checkrestart is also sensitive to the kernel version in use. And might fail to work with newer (or older) versions.
A rewrite to make it less dependent on lsof could improve this, however.
checkrestart was written by Matt Zimmerman for the Debian GNU/Linux distribution.
Copyright (C) 2001 Matt Zimmerman <mdz@debian.org> Copyright (C) 2007,2010-2011 Javier Fernandez-Sanguino <jfs@debian.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
On Debian systems, a copy of the GNU General Public License may be found in /usr/share/common-licenses/GPL.