Imported Debian version 0.29
Javier Fernandez-Sanguino
12 years ago
104 | 104 | print "(%d distinct packages)" % len(packages) |
105 | 105 | |
106 | 106 | if len(packages) == 0: |
107 | print "No packages seem to need to be restarted." | |
108 | print "(please read checkrestart(1))" | |
107 | 109 | sys.exit(0) |
108 | 110 | |
109 | 111 | for package in packages.values(): |
130 | 132 | |
131 | 133 | |
132 | 134 | print "Of these, %d seem to contain init scripts which can be used to restart them:" % len(restartable) |
135 | # TODO - consider putting this in a --verbose option | |
136 | print "Of these, the following seem to contain init scripts which can be used to restart them:" | |
137 | for package in restartable: | |
138 | print package.name + ':' | |
139 | for process in package.processes: | |
140 | print "\t%s\t%s" % (process.pid,process.program) | |
141 | ||
142 | ||
143 | print "These are the init scripts:" | |
133 | 144 | print '\n'.join(restartCommands) |
134 | 145 | |
135 | 146 | |
136 | 147 | if len(nonrestartable) == 0: |
137 | 148 | sys.exit(0) |
138 | 149 | |
139 | print "Here are the others:" | |
150 | # TODO - consider putting this in a --verbose option | |
151 | print "Here are the others that do not seem to contain an init script for restarting them::" | |
140 | 152 | for package in nonrestartable: |
141 | 153 | print package.name + ':' |
142 | 154 | for process in package.processes: |
0 | debian-goodies (0.29) unstable; urgency=low | |
1 | ||
2 | * Network-test: use -t switch to use user's TMPDIR or /tmp instead of | |
3 | trying to create it under $PWD (Closes: #432311) | |
4 | * Add a Suggests: netcat (Closes: #400479) | |
5 | * popbugs: | |
6 | * Make it parse the new format of the RC buglist properly (Closes: #421355) | |
7 | * Add a debug option | |
8 | * Fix a typo in the output | |
9 | * Change maintainer's email address in debian/control | |
10 | ||
11 | -- Javier Fernandez-Sanguino Pen~a <jfs@debian.org> Mon, 09 Jul 2007 18:23:53 +0200 | |
12 | ||
13 | debian-goodies (0.28) unstable; urgency=low | |
14 | ||
15 | * Apply patch by Francesco Potorti that makes checkrestart list | |
16 | processes that should be restarted when a daemon is restarted. | |
17 | This helps warn users that some processes will not be restarted | |
18 | even though they use the init script (such as active ssh connections). And | |
19 | need to be restarted manually (Closes: #290265) | |
20 | * Be more verbose when nothing needs to be done (the user might think that | |
21 | the script did not do anything!) | |
22 | ||
23 | -- Javier Fernandez-Sanguino Pen~a <jfs@computer.org> Tue, 19 Dec 2006 11:24:57 +0100 | |
24 | ||
0 | 25 | debian-goodies (0.27) unstable; urgency=medium |
1 | 26 | |
2 | 27 | [ Fixes I would like to see in etch, even though we're on freeze now ] |
9 | 34 | http://robots.org.uk/src/psdel and contributed in the BTS. But it still |
10 | 35 | needs to be massaged to work as a replacement for lsof) |
11 | 36 | * Write a manpage for checkrestart so administrators are aware that this |
12 | tool should not be completely relied on. | |
37 | tool should not be completely relied on. (Closes: #305279) | |
13 | 38 | * Update the version of network-test which fixes some of the bugs already |
14 | 39 | fixed in the experimental 'ifupdown-extra' package: |
15 | 40 | [ Note: Post-etch network-test will be removed from this package but |
0 | 0 | Source: debian-goodies |
1 | 1 | Section: utils |
2 | 2 | Priority: optional |
3 | Maintainer: Javier Fernandez-Sanguino Pen~a <jfs@computer.org> | |
3 | Maintainer: Javier Fernandez-Sanguino Pen~a <jfs@debian.org> | |
4 | 4 | Build-Depends-Indep: debhelper (>> 3.0.0) |
5 | 5 | Standards-Version: 3.5.2 |
6 | 6 | |
7 | 7 | Package: debian-goodies |
8 | 8 | Architecture: all |
9 | 9 | Depends: dctrl-tools | grep-dctrl, curl, python (>= 2.3), lsof |
10 | Suggests: popularity-contest | |
10 | Suggests: popularity-contest, netcat | |
11 | 11 | Conflicts: debget |
12 | 12 | Replaces: debget |
13 | 13 | Description: Small toolbox-style utilities for Debian systems |
375 | 375 | status=1 |
376 | 376 | nsfound=0 |
377 | 377 | nsok=0 |
378 | tempfile=`mktemp tmptestnet.XXXXXX` || { echo "ERR: Cannot create temporary file! Aborting! " >&2 ; exit 1; } | |
378 | tempfile=`mktemp -t tmptestnet.XXXXXX` || { echo "ERR: Cannot create temporary file! Aborting! " >&2 ; exit 1; } | |
379 | 379 | trap " [ -f \"$tempfile\" ] && /bin/rm -f -- \"$tempfile\"" 0 1 2 3 13 15 |
380 | 380 | cat /etc/resolv.conf | grep -v ^# | grep nameserver | |
381 | 381 | awk '/nameserver/ { for (i=2;i<=NF;i++) { print $i ; } }' >$tempfile |
15 | 15 | |
16 | 16 | popconfile = '/var/log/popularity-contest' |
17 | 17 | bugurl = 'http://bugs.debian.org/release-critical/other/all.html' |
18 | # For testing purposes: | |
19 | #bugurl = 'file:///tmp/all.html' | |
18 | 20 | outputfile = None |
19 | 21 | |
22 | debug = 0 | |
20 | 23 | try: |
21 | opts, args = getopt.getopt(sys.argv[1:], "ho:", | |
22 | ["help","output="]) | |
24 | opts, args = getopt.getopt(sys.argv[1:], "dho:", | |
25 | ["debug", "help","output="]) | |
23 | 26 | except getopt.GetoptError: |
24 | 27 | sys.stderr.write(usage) |
25 | 28 | sys.exit(2) |
29 | 32 | sys.exit() |
30 | 33 | elif o in ("-o", "--output"): |
31 | 34 | outputfile = a |
35 | elif o in ("-d", "--debug"): | |
36 | debug = 1 | |
32 | 37 | |
33 | 38 | if len(args) >= 1: |
34 | 39 | popconfile = args[0] |
35 | 40 | if not os.path.exists(popconfile): |
36 | 41 | sys.stderr.write(''' |
37 | I cannot file the popularity-contest data you pointed me to. | |
42 | I cannot find the popularity-contest data you pointed me to. | |
38 | 43 | This program requires the data collected from popularity-contest |
39 | 44 | in order to work. |
40 | 45 | |
93 | 98 | (atime, ctime, package, pathname) = fields |
94 | 99 | # if pathname == '<NOFILES>' or pathname == '<RECENT-CTIME>': |
95 | 100 | # continue |
96 | ||
101 | ||
102 | if debug: | |
103 | print "POPCON: Adding package " + package | |
97 | 104 | packages[package] = Package(package,atime) |
98 | 105 | pkglist.append(packages[package]) |
99 | 106 | |
103 | 110 | |
104 | 111 | while page: |
105 | 112 | line = page.pop(0) |
113 | if line.startswith('<div'): | |
114 | break | |
106 | 115 | output.write(line) |
107 | if line.startswith('<pre>'): | |
108 | break | |
109 | 116 | |
110 | packagere = re.compile('^<a name="([^"]+)"><strong>Package:.*') | |
117 | packagere = re.compile('.*<a name="([^"]+)"><strong>Package:.*') | |
111 | 118 | while page: |
112 | 119 | m = packagere.match(page[0]) |
113 | 120 | if m: |
121 | 128 | break |
122 | 129 | |
123 | 130 | pkgname = m.group(1) |
131 | if debug: | |
132 | print "REGEX: Parsing package " + pkgname | |
124 | 133 | |
125 | 134 | if pkgname in packages: |
135 | if debug: | |
136 | print "REGEX: Package " + pkgname + "is in packages" | |
126 | 137 | packages[pkgname].html = html |
127 | 138 | else: |
128 | if page[0].startswith('</pre>'): | |
139 | if page[0].startswith('<hr>'): | |
129 | 140 | break |
130 | 141 | page.pop(0) |
131 | 142 |
30 | 30 | .BI \-o outputfile |
31 | 31 | .TP |
32 | 32 | .BI \-\-output= outputfile |
33 | Place the output in | |
33 | Place the output in | |
34 | 34 | .I outputfile |
35 | 35 | instead of displaying it in a browser. |
36 | .TP | |
37 | .BI \-d | |
38 | .TP | |
39 | .BI \-\-debug | |
40 | Output debugging information. | |
36 | 41 | .SH SEE ALSO |
37 | 42 | .BR rc\-alert (1), |
38 | 43 | .BR popularity\-contest (8) |