[svn] commit: r3025 - /branches/trac322/src/bin/bind10/bind10.py.in
BIND 10 source code commits
bind10-changes at lists.isc.org
Sun Sep 26 13:14:05 UTC 2010
Author: vorner
Date: Sun Sep 26 13:14:04 2010
New Revision: 3025
Log:
More clever names for the BOB
It contains a version number by default and has a --pretty-name option,
so user can specify a name if she has more binds running.
Modified:
branches/trac322/src/bin/bind10/bind10.py.in
Modified: branches/trac322/src/bin/bind10/bind10.py.in
==============================================================================
--- branches/trac322/src/bin/bind10/bind10.py.in (original)
+++ branches/trac322/src/bin/bind10/bind10.py.in Sun Sep 26 13:14:04 2010
@@ -65,10 +65,11 @@
import isc.cc
import isc.utils.process
-isc.utils.process.rename()
-
# This is the version that gets displayed to the user.
__version__ = "v20100531"
+
+# Assign this process some nicer name
+isc.utils.process.rename("bind10" + __version__)
class RestartSchedule:
"""
@@ -621,7 +622,11 @@
parser.values.address = value
else:
raise OptionValueError("Unknown option " + opt_str)
-
+
+def process_rename(option, opt_str, value, parser):
+ """Function that renames the process if it is requested by a option."""
+ isc.utils.process.rename(value)
+
def main():
global options
global boss_of_bind
@@ -647,6 +652,9 @@
help="Change user after startup (must run as root)")
parser.add_option("-v", "--verbose", dest="verbose", action="store_true",
help="display more about what is going on")
+ parser.add_option("--pretty-name", type="string", action="callback",
+ callback=process_rename,
+ help="Set the process name (displayed in ps, top, ...)")
(options, args) = parser.parse_args()
if args:
parser.print_help()
More information about the bind10-changes
mailing list