[Ocfs2-tools-commits] manish commits r744 - in trunk/ocfs2console:
. ocfs2interface
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Sun Mar 27 16:32:21 CST 2005
Author: manish
Date: 2005-03-27 16:32:19 -0600 (Sun, 27 Mar 2005)
New Revision: 744
Modified:
trunk/ocfs2console/ocfs2console
trunk/ocfs2console/ocfs2interface/about.py
trunk/ocfs2console/ocfs2interface/clconfig.py
trunk/ocfs2console/ocfs2interface/console.py
Log:
Add the ability to start the cluster configurator standalone
Modified: trunk/ocfs2console/ocfs2console
===================================================================
--- trunk/ocfs2console/ocfs2console 2005-03-27 22:06:23 UTC (rev 743)
+++ trunk/ocfs2console/ocfs2console 2005-03-27 22:32:19 UTC (rev 744)
@@ -4,7 +4,7 @@
#!/usr/bin/python -W ignore::DeprecationWarning
from ocfs2interface.about import process_args
-process_args()
+clusterconf = process_args()
try:
import gtk
@@ -14,5 +14,9 @@
Make sure a proper setup for your display environment exists.\n'''
sys.exit(1)
-from ocfs2interface.console import main
-main()
+if clusterconf:
+ from ocfs2interface.clconfig import cluster_configurator
+ cluster_configurator()
+else:
+ from ocfs2interface.console import main
+ main()
Modified: trunk/ocfs2console/ocfs2interface/about.py
===================================================================
--- trunk/ocfs2console/ocfs2interface/about.py 2005-03-27 22:06:23 UTC (rev 743)
+++ trunk/ocfs2console/ocfs2interface/about.py 2005-03-27 22:32:19 UTC (rev 744)
@@ -25,20 +25,27 @@
def print_usage(name):
print '''Usage: %s [OPTION]...
Options:
- -V, --version print version information and exit
- --help display this help and exit''' % name
+ -C, --clusterconf run cluster configurator only
+ -V, --version print version information and exit
+ --help display this help and exit''' % name
def process_args():
+ clusterconf = False
+
for arg in sys.argv[1:]:
- if arg == '--version' or arg == '-V':
+ if arg in ('--version', '-V'):
print_version()
sys.exit(0)
- elif arg == '--help':
+ elif arg in ('--help',):
print_usage(sys.argv[0])
sys.exit(0)
+ elif arg in ('--clusterconf', '-C'):
+ clusterconf = True
+ return clusterconf
+
def process_gui_args():
- if len(sys.argv) > 1:
+ if len(sys.argv) > 1 and sys.argv[1] not in ('--clusterconf', '-C'):
print_usage(sys.argv[0])
sys.exit(1)
Modified: trunk/ocfs2console/ocfs2interface/clconfig.py
===================================================================
--- trunk/ocfs2console/ocfs2interface/clconfig.py 2005-03-27 22:06:23 UTC (rev 743)
+++ trunk/ocfs2console/ocfs2interface/clconfig.py 2005-03-27 22:32:19 UTC (rev 744)
@@ -64,6 +64,9 @@
buttons=(gtk.STOCK_APPLY, gtk.RESPONSE_APPLY,
gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE))
+ if parent is None:
+ self.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_NORMAL)
+
frame = gtk.Frame()
frame.set_shadow_type(gtk.SHADOW_NONE)
self.vbox.add(frame)
@@ -515,6 +518,8 @@
info.destroy()
def main():
+ from about import process_gui_args
+ process_gui_args()
cluster_configurator()
if __name__ == '__main__':
Modified: trunk/ocfs2console/ocfs2interface/console.py
===================================================================
--- trunk/ocfs2console/ocfs2interface/console.py 2005-03-27 22:06:23 UTC (rev 743)
+++ trunk/ocfs2console/ocfs2interface/console.py 2005-03-27 22:32:19 UTC (rev 744)
@@ -141,6 +141,7 @@
cluster_configurator(self)
def main():
+ from about import process_gui_args
process_gui_args()
console = Console()
gtk.main()
More information about the Ocfs2-tools-commits
mailing list