Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 148362 Details for
Bug 229264
[PATCH: system-config-rootpassword-cmd.path] command line interface
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
command line interface for system-config-rootpassword
system-config-rootpassword-cmd.path (text/plain), 1.69 KB, created by
Damien Durand
on 2007-02-19 20:23:45 UTC
(
hide
)
Description:
command line interface for system-config-rootpassword
Filename:
MIME Type:
Creator:
Damien Durand
Created:
2007-02-19 20:23:45 UTC
Size:
1.69 KB
patch
obsolete
>--- system-config-rootpassword.py.old 2006-10-31 15:31:54.000000000 +0100 >+++ system-config-rootpassword.py 2007-02-19 21:48:22.000000000 +0100 >@@ -3,8 +3,9 @@ > # system-config-rootpassword.py - kickoff script for rootpassword.py > # > # Brent Fox <bfox@redhat.com> >+# Damien Durand <splinux@fedoraproject.org> > # >-# Copyright 2002, 2003 Red Hat, Inc. >+# Copyright 2002, 2007 Red Hat, Inc. and Fedora Usability > # > # This program is free software; you can redistribute it and/or modify > # it under the terms of the GNU General Public License as published by >@@ -23,6 +24,7 @@ > > import signal > import sys >+import getopt > > if __name__ == "__main__": > signal.signal (signal.SIGINT, signal.SIG_DFL) >@@ -34,12 +36,36 @@ > import rhpl.translate as translate > translate.textdomain ("system-config-rootpassword") > >-try: >- import gtk >- import passwordDialog >-except: >- import rootpassword_tui >- app = rootpassword_tui.childWindow() >+def useTextMode(): >+ import rootpassword_tui >+ app = rootpassword_tui.childWindow() >+ >+def useGuiMode(): >+ import gtk >+ import passwordDialog >+ app = passwordDialog.childWindow() >+ app.stand_alone() >+ >+def useCliMode(kbdtype, help): >+ sys.stderr.write(_("Usage: system-config-rootpassword [--text]\n")) >+ sys.exit(0) >+ >+opts, kbdtype = getopt.getopt(sys.argv[1:], "d:h", ["text", "help"]) >+help = None >+ >+for(opt, value) in opts: >+ if opt == "--help": >+ help = 1 >+ useCliMode(kbdtype, help) >+ >+if "--text" in sys.argv or "-t" in sys.argv: >+ useTextMode() >+ > else: >- app = passwordDialog.childWindow() >- app.stand_alone() >+ try: >+ useGuiMode() >+ except: >+ print _("Starting graphical mode failed. Starting text mode instead.") >+ import time >+ time.sleep(2) >+ useTextMode()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 229264
: 148362