/[gli]/trunk/src/GLIClientController.py
Gentoo

Diff of /trunk/src/GLIClientController.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 262 Revision 263
1""" 1"""
2Gentoo Linux Installer 2Gentoo Linux Installer
3 3
4$Id: GLIClientController.py,v 1.38 2005/01/16 04:04:36 agaffney Exp $ 4$Id: GLIClientController.py,v 1.39 2005/01/18 08:03:23 codeman Exp $
5Copyright 2004 Gentoo Technologies Inc. 5Copyright 2004 Gentoo Technologies Inc.
6 6
7Steps (based on the ClientConfiguration): 7Steps (based on the ClientConfiguration):
8 1. Load any modules? (this may have to be done manually, using a shell - not implemented) 8 1. Load any modules? (this may have to be done manually, using a shell - not implemented)
9 2. Set the root password (may need to generate one. GLIUtility.generate_random_password()) 9 2. Set the root password (may need to generate one. GLIUtility.generate_random_password())
173 self.output(error) 173 self.output(error)
174 self._logger.log(error.get_error_level() + '! ' + error.get_error_msg()) 174 self._logger.log(error.get_error_level() + '! ' + error.get_error_msg())
175 175
176 def set_root_passwd(self): 176 def set_root_passwd(self):
177 self._logger.log("Setting root password.") 177 self._logger.log("Setting root password.")
178 if self._configuration.get_root_passwd() == "": 178 if self._configuration.get_root_passwd() != "":
179 passwd = GLIUtility.generate_random_password()
180 status = GLIUtility.spawn('echo "root:' + passwd + '" | chpasswd',quiet=True)
181 else:
182 # The password specified in the configuration is encrypted. 179 # The password specified in the configuration is encrypted.
183 status = GLIUtility.spawn('echo "root:' + self._configuration.get_root_passwd() + '" | chpasswd -e',quiet=True) 180 status = GLIUtility.spawn('echo "root:' + self._configuration.get_root_passwd() + '" | chpasswd -e',quiet=True)
184 181
185 if not GLIUtility.exitsuccess(status): 182 if not GLIUtility.exitsuccess(status):
186 raise GLIException("PasswordError", 'warning', 'set_root_passwd', "Could not set the root password!") 183 raise GLIException("PasswordError", 'warning', 'set_root_passwd', "Could not set the root password!")

Legend:
Removed from v.262  
changed lines
  Added in v.263

  ViewVC Help
Powered by ViewVC 1.1.20