/[gli]/branches/overhaul/src/GLIArchitectureTemplate.py
Gentoo

Diff of /branches/overhaul/src/GLIArchitectureTemplate.py

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

Revision 525 Revision 526
1""" 1"""
2Gentoo Linux Installer 2Gentoo Linux Installer
3 3
4$Id: GLIArchitectureTemplate.py,v 1.98 2005/04/28 03:56:08 agaffney Exp $ 4$Id: GLIArchitectureTemplate.py,v 1.99 2005/04/29 02:20:05 codeman Exp $
5Copyright 2004 Gentoo Technologies Inc. 5Copyright 2004 Gentoo Technologies Inc.
6 6
7The ArchitectureTemplate is largely meant to be an abstract class and an 7The ArchitectureTemplate is largely meant to be an abstract class and an
8interface (yes, it is both at the same time!). The purpose of this is to create 8interface (yes, it is both at the same time!). The purpose of this is to create
9subclasses that populate all the methods with working methods for that architecture. 9subclasses that populate all the methods with working methods for that architecture.
898 options.append("-G " + groups[0]) 898 options.append("-G " + groups[0])
899 899
900 # If there is more than one group 900 # If there is more than one group
901 elif len(groups) > 1: 901 elif len(groups) > 1:
902 options.append('-G "' + string.join(groups, ",") + '"') 902 options.append('-G "' + string.join(groups, ",") + '"')
903
904 # Attempt to add the group (will return success when group exists)
905 for group in groups:
906 # Add the user
907 exitstatus = GLIUtility.spawn('groupadd -f ' + group, chroot=self._chroot_dir, logfile=self._compile_logfile, append_log=True, display_on_tty8=True)
908 if not GLIUtility.exitsuccess(exitstatus):
909 self._logger.log("ERROR! : Failure to add group " + group+" and it wasn't that the group already exists!")
910
903 911
904 # If a shell is specified 912 # If a shell is specified
905 if shell: 913 if shell:
906 options.append("-s " + shell) 914 options.append("-s " + shell)
907 915
961 try: 969 try:
962 GLIUtility.get_uri(self._install_profile.get_post_install_script_uri(), self._chroot_dir + "/tmp/post-install") 970 GLIUtility.get_uri(self._install_profile.get_post_install_script_uri(), self._chroot_dir + "/tmp/post-install")
963 GLIUtility.spawn("chmod a+x /tmp/post-install && /tmp/post-install", chroot=self._chroot_dir, display_on_tty8=True, logfile=self._compile_logfile, append_log=True) 971 GLIUtility.spawn("chmod a+x /tmp/post-install && /tmp/post-install", chroot=self._chroot_dir, display_on_tty8=True, logfile=self._compile_logfile, append_log=True)
964 except: 972 except:
965 raise GLIException("RunPostInstallScriptError", 'fatal', 'run_post_install_script', "Failed to retrieve and/or execute post-install script") 973 raise GLIException("RunPostInstallScriptError", 'fatal', 'run_post_install_script', "Failed to retrieve and/or execute post-install script")
966

Legend:
Removed from v.525  
changed lines
  Added in v.526

  ViewVC Help
Powered by ViewVC 1.1.20