Codebase list debian-goodies / 17d5043
Imported Debian version 0.29 Javier Fernandez-Sanguino 12 years ago
6 changed file(s) with 67 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
104104 print "(%d distinct packages)" % len(packages)
105105
106106 if len(packages) == 0:
107 print "No packages seem to need to be restarted."
108 print "(please read checkrestart(1))"
107109 sys.exit(0)
108110
109111 for package in packages.values():
130132
131133 print
132134 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 print
143 print "These are the init scripts:"
133144 print '\n'.join(restartCommands)
134145 print
135146
136147 if len(nonrestartable) == 0:
137148 sys.exit(0)
138149
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::"
140152 for package in nonrestartable:
141153 print package.name + ':'
142154 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
025 debian-goodies (0.27) unstable; urgency=medium
126
227 [ Fixes I would like to see in etch, even though we're on freeze now ]
934 http://robots.org.uk/src/psdel and contributed in the BTS. But it still
1035 needs to be massaged to work as a replacement for lsof)
1136 * 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)
1338 * Update the version of network-test which fixes some of the bugs already
1439 fixed in the experimental 'ifupdown-extra' package:
1540 [ Note: Post-etch network-test will be removed from this package but
00 Source: debian-goodies
11 Section: utils
22 Priority: optional
3 Maintainer: Javier Fernandez-Sanguino Pen~a <jfs@computer.org>
3 Maintainer: Javier Fernandez-Sanguino Pen~a <jfs@debian.org>
44 Build-Depends-Indep: debhelper (>> 3.0.0)
55 Standards-Version: 3.5.2
66
77 Package: debian-goodies
88 Architecture: all
99 Depends: dctrl-tools | grep-dctrl, curl, python (>= 2.3), lsof
10 Suggests: popularity-contest
10 Suggests: popularity-contest, netcat
1111 Conflicts: debget
1212 Replaces: debget
1313 Description: Small toolbox-style utilities for Debian systems
375375 status=1
376376 nsfound=0
377377 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; }
379379 trap " [ -f \"$tempfile\" ] && /bin/rm -f -- \"$tempfile\"" 0 1 2 3 13 15
380380 cat /etc/resolv.conf | grep -v ^# | grep nameserver |
381381 awk '/nameserver/ { for (i=2;i<=NF;i++) { print $i ; } }' >$tempfile
1515
1616 popconfile = '/var/log/popularity-contest'
1717 bugurl = 'http://bugs.debian.org/release-critical/other/all.html'
18 # For testing purposes:
19 #bugurl = 'file:///tmp/all.html'
1820 outputfile = None
1921
22 debug = 0
2023 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="])
2326 except getopt.GetoptError:
2427 sys.stderr.write(usage)
2528 sys.exit(2)
2932 sys.exit()
3033 elif o in ("-o", "--output"):
3134 outputfile = a
35 elif o in ("-d", "--debug"):
36 debug = 1
3237
3338 if len(args) >= 1:
3439 popconfile = args[0]
3540 if not os.path.exists(popconfile):
3641 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.
3843 This program requires the data collected from popularity-contest
3944 in order to work.
4045
9398 (atime, ctime, package, pathname) = fields
9499 # if pathname == '<NOFILES>' or pathname == '<RECENT-CTIME>':
95100 # continue
96
101
102 if debug:
103 print "POPCON: Adding package " + package
97104 packages[package] = Package(package,atime)
98105 pkglist.append(packages[package])
99106
103110
104111 while page:
105112 line = page.pop(0)
113 if line.startswith('<div'):
114 break
106115 output.write(line)
107 if line.startswith('<pre>'):
108 break
109116
110 packagere = re.compile('^<a name="([^"]+)"><strong>Package:.*')
117 packagere = re.compile('.*<a name="([^"]+)"><strong>Package:.*')
111118 while page:
112119 m = packagere.match(page[0])
113120 if m:
121128 break
122129
123130 pkgname = m.group(1)
131 if debug:
132 print "REGEX: Parsing package " + pkgname
124133
125134 if pkgname in packages:
135 if debug:
136 print "REGEX: Package " + pkgname + "is in packages"
126137 packages[pkgname].html = html
127138 else:
128 if page[0].startswith('</pre>'):
139 if page[0].startswith('<hr>'):
129140 break
130141 page.pop(0)
131142
3030 .BI \-o outputfile
3131 .TP
3232 .BI \-\-output= outputfile
33 Place the output in
33 Place the output in
3434 .I outputfile
3535 instead of displaying it in a browser.
36 .TP
37 .BI \-d
38 .TP
39 .BI \-\-debug
40 Output debugging information.
3641 .SH SEE ALSO
3742 .BR rc\-alert (1),
3843 .BR popularity\-contest (8)