Package list debian-goodies / 33a6ac2
Imported Debian version 0.40 Javier Fernandez-Sanguino 9 years ago
2 changed file(s) with 30 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
3636 import sys
3737 import os, errno
3838 import re
39 import stat
4039 import pwd
4140 import sys
4241 import string
4342 import subprocess
43 from stat import *
4444
4545 if os.getuid() != 0:
46 sys.stderr.write('This program must be run as root\n')
47 sys.stderr.write('in order to collect information about all open file descriptors\n')
46 sys.stderr.write('ERROR: This program must be run as root in order to obtain information\n')
47 sys.stderr.write('about all open file descriptors in the system.\n')
4848 sys.exit(1)
4949
5050
8080 programs.setdefault(process.program, [])
8181 programs[process.program].append(process)
8282
83 print "(%d distinct programs)" % len(programs)
83 if len(programs) == 1:
84 print "(%d distinct program)" % len(programs)
85 else:
86 print "(%d distinct programs)" % len(programs)
8487
8588 packages = {}
8689 diverted = None
182185 last = process.descriptors.pop()
183186 if not re.compile("DEL").search(last):
184187 process.files.append(data)
185 elif data.startswith('/dev/zero'):
188 elif data.startswith('/dev/zero') or data.startswith('/dev/pts/'):
186189 last = process.descriptors.pop()
187190 if not re.compile("DEL").search(last):
188191 process.files.append(data)
292295 null = f.find('\0')
293296 if null != -1:
294297 f = f[:null]
298 # Support symlinked /usr
299 if f.startswith('/usr'):
300 statinfo = os.lstat('/usr')[ST_MODE]
301 if S_ISLNK(statinfo):
302 newusr = os.readlink('/usr')
303 if not newusr.startswith('/'):
304 newusr = os.path.join(os.path.dirname('/tmp/test'), newusr)
305 f = re.sub('^/usr',newusr, f)
306 print "Changing usr to " + newusr + " result:" +f;
295307 return re.sub('( \(deleted\)|.dpkg-new).*$','',f)
296308
297309 # Check if a process needs to be restarted, previously we would
310322 continue
311323 # Or /dev/zero
312324 if f.startswith('/dev/zero'):
325 continue
326 # Or /dev/pts (used by gpm)
327 if f.startswith('/dev/pts/'):
313328 continue
314329 # TODO: it should only care about library files (i.e. /lib, /usr/lib and the like)
315330 # build that check with a regexp to exclude others
0 debian-goodies (0.40) unstable; urgency=low
1
2 * checkrestart:
3 - skip deleted files under /dev/pts/ to prevent telling users to
4 restart gpm (Closes: 468124)
5 - support /usr being symlinked (Closes: 405040)
6 - minor changes in output messages.
7
8 -- Javier Fernandez-Sanguino Pen~a <jfs@debian.org> Sat, 01 Mar 2008 16:36:40 +0100
9
010 debian-goodies (0.39) unstable; urgency=low
111
212 * Remove the network-test script, which now has been moved to the