Appendix Overview of each ICT

Appendix Overview of each ICT

ICT Implemented in C, defined in file usr/src/lib/libict/ict.c are:

  • ict_configure_user_directory()

    • Description:

      Configure the user directory. uid, gid are predefined. The user directory has been created in export/home on the specified install target by liborchestrator. It is possible a new user account is not desired. So if login is NULL or empty do nothing and simply return success.

    • Implementation:

      Utilizes chmod(2) and chown(2) to set new user ownership.

  • ict_set_user_profile()

    • Description:

      Copy the user profile from /etc/skel on the distribution media, to include both a .profile file and a .bashrc file, to the new user home directory.

    • Implementation:

      Utilizes cp(1) to copy the files, chmod(2) and chown(2) to set new user ownership.

  • ict_set_user_role()

    • Description:

      Set the user role, if needed, on the specified install target.

    • Implementation:

      Edits the user attribute file, /etc/user_attr on the target, directly using sed(1)

  • ict_set_lang_locale()

    • Description:

      Set the language locale in init file.

    • Implementation:

      Utilizes cp(1) to copy the file /etc/default/init to the target and echo(1) to append the LANG= string.

  • ict_set_host_node_name()

    • Description:

      Set the hostname and nodename in the install target.

    • Implementation:

      Utilizes sed(1) to add loopback address to /etc/inet/hosts file on the target. Then uses cp(1) to copy the file /etc/nodename to the target and sed(1) to set the desired hostname.

  • ict_installboot()

    • Description:

      This function prepares a bootloader or bootblock on the specified device.

    • Implementation:
      • On x86 platforms implemented using installgrub(1M)
      • On SPARC platforms implemented using installboot(1M)
  • ict_snapshot()

    • Description:

      Create a ZFS snapshots for the specified data set.

    • Implementation:

      Utilizes be_create_snapshot(), from libbe.

  • ict_transfer_logs()

    • Description:

      Transfer the installation log file to the target.

    • Implementation:

      Utilizes ls_transfer() to transfer the install log file from /tmp, where it is written during installation, to /var/sadm/system/logs/
      on the target.

  • ict_mark_root_pool_ready()

    • Description:

      Mark ZFS root pool ready in order to let the world know that the pool contains complete Solaris instance

    • Implementation:

      Utilizes zfs(1M) set.

The ICT Supporting functions defined in file usr/src/lib/libict/ict.c are:

  • ict_escape()

    • Description:

      Prepare a string to be passed to the shell by escaping any apostrophes.

    • Implementation:

      Implemented using direct memory access to manipulate a string, replacing any occurrence of a single apostrophe with apostrophe-backslash-apostrophe-apostrophe

  • ict_get_error()

    • Description:

      Returns the current error number set by the last called ICT function.

  • set_error()

    • Description:

      Sets the error number passed as the argument.

  • ict_debug_print()

    • Description:

      Posts a debug message to the specified output.

  • ict_log_print()

    • Description:

      Logs a message to the specified output.

  • ict_safe_system()

    • Description:

      Execute shell commands in a thread-safe manner

    • Implementation:

      Implemented using popen(3C)

ICT Implemented in Python, defined in file usr/src/lib/libict_pymod/ict.py are:

  • add_other_OS_to_grub_menu

    • Description:

      Add entries for other installed OS's to the grub menu

    • Implementation:
      • Launches the mkmenu script
        • in slim_source gate under: ./usr/src/cmd/slim-install/finish/mkmenu
        • available on LiveMedia at: /sbin/mkmenu
  • add_splash_image_to_grub_menu

    • Description:

      Append splashimage and timeout commands to GRUB menu

    • Implementation:

      Implemented using the Python built in file manipulation functions

  • add_sysidtool_sys_unconfig_entries

    • Description:

      Add entries for sysidtool and sys-unconfig to run all known external apps.

    • Implementation:

      Implemented using the Python built in file manipulation functions and module shutil - High-level file operations.

  • cleanup_unneeded_files_and_directories

    • Description:

      Removes some files that should not have been copied to the target

    • Implementation:

      Implemented using the Python miscellaneous operating system interfaces, os

  • copy_splash_xpm

    • Description:

      Copy splash file from system to grub directory on target.

    • Implementation:

      Implemented using the Python built in file manipulation functions and the miscellaneous operating system interfaces module, os.

  • create_mnttab

    • Description:

      Creates /etc/mnttab on target, if it doesn't already exist,

    • Implementation:

      Implemented using the Python built in file manipulation functions and the miscellaneous operating system interfaces module, os.

  • create_new_user

    • Description:

      Uses IPS class PasswordFile from pkg.cfgfiles to create new user on target.

    • Implementation:
      • Implemented using IPS class PasswordFile from pkg.cfgfiles
      • Note: This is an unsupported interface and may change.
  • create_smf_repository

    • Description:

      Copies /lib/svc/seed/global.db to /etc/svc/repository.db

    • Implementation:

      Implemented using the Python miscellaneous operating system interfaces module, os and the High-level file operations module, shutil.

  • delete_misc_trees

    • Description:

      Deletes miscellaneous temp work directories.

    • Implementation:

      Executes rm(1) passed to the shell using the ICT module utility routine _cmd_out()

  • enable_happy_face_boot

    • Description:

      Update the GRUB menu.lst file to Enable happy face boot entry.

    • Implementation:
      • Implemented using the Python built in file manipulation functions and the miscellaneous operating system interfaces module, os.
      • See the comments for more info.
  • enable_nwam and enable_nwam_AI

    • Description:

      Enable nwam service on the target leveraging svcadm configuration file: /var/svc/profile/upgrade.

    • Implementation:
      • Implemented using the Python built in file manipulation functions and svcadm and the miscellaneous operating system interfaces module, os.
  • explicit_bootfs

    • Description:

      Set an explicit bootfs value in the grub menu.lst so libbe can support the initial boot environment.

    • Implementation:

      Executes sed(1) to edit the menu.lst file and the Python the High-level file operations module, shutil.

  • fix_browser_home_page

    • Description:

      Change the default browser home page from the "How To Install" to "How to Use" OpenSolaris.

    • Implementation:

      Executes sed(1) to edit the file: /usr/lib/firefox/browserconfig.properties and the Python Generate temporary files and directories module, tempfile .

  • fix_grub_entry

    • Description:

      Fix up the menu.lst grub entry on the target.

    • Implementation:

      Executes sed(1) to edit the grub menu.lst file.

  • keyboard_layout

    Description:

    Set the keyboard layout in file /etc/default/kbd on the target

    • Implementation:

      Implemented using the Python built in file manipulation functions and the Python fcntl() and ioctl() system calls module, fcntl.

  • remove_bootpath

    • Description:

      Remove bootpath property from bootenv.rc

    • Implementation:

      Executes sed(1) to edit the bootenv.rc file.

  • remove_files

    • Description:

      Remove a list of files

    • Implementation:

      Implemented using the Python miscellaneous operating system interfaces module, os.

  • remove_install_specific_packages

    • Description:

      Remove packages needed to run the installer.

    • Implementation:

      Implemented using the IPS pkg(1) command.

  • remove_liveCD_coreadm_conf

    • Description:

      Remove LiveCD-specific config file.

    • Implementation:

      Implemented using the Python miscellaneous operating system interfaces module, os.

  • remove_liveCD_environment

    • Description:

      Move saved configuration files to clean out live CD environment.

    • Implementation:

      Implemented using the Python miscellaneous operating system interfaces module, os and cpioi(1).

  • reset_image_UUID

    • Description:

      Reset IPS image UUID for opensolaris.org

    • Implementation:

      Implemented using the IPS pkg(1) set-authority command.

  • set_Solaris_partition_active

    • Description:

      Set the installed to Solaris partition active.

    • Implementation:
      • Uses class ict supporting methods get_rootdev_list, set_boot_active and bootadm_update_menu
        • get_rootdev_list - Implemented using zpool(1M) iostat
        • set_boot_active - Implemented using fdisk(1M), parsing the fdisk output.
        • bootadm_update_menu - Implemented using bootadm(1M) update-menu to add a failsafe menu entry to GRUB menu.lst
  • set_console_boot_device_property

    • Description:

      Update bootenv.rc 'console' property.

    • Implementation:
      • Uses class ict supporting methods _get_bootprop, _get_osconsole and _update_bootprop
        • _get_bootprop - Implemented using the Python built in file manipulation functions
        • _get_osconsole - Implemented using prtconf(1M), parsing the prtconf output.
        • _update_bootprop - Implemented using the Python built in file manipulation functions and the miscellaneous operating system interfaces module, os.
  • set_flush_content_cache_on_success_false

    • Description:

      Set IPS default to not purge the IPS download cache.

    • Implementation:

      Soon to be implemented using the IPS pkg(1) set-property command.
      Bug 6102

  • set_prop_from_eeprom

    • Description:

      Using eeprom(1M) fetch the specified property and assign to bootenv.rc

    • Implementation:

      Implemented using eeprom(1M).

  • set_root_password

    • Description:

      Set the root password on the specified install target.

    • Implementation:
      • Implemented using IPS class PasswordFile from pkg.cfgfiles
      • Note: This is an unsupported interface and may change.
  • smf_correct_sys_profile

    • Description:

      Point SMF at correct system profile by manipulating /var/svc/profile file links

    • Implementation:

      Implemented using the Python miscellaneous operating system interfaces module, os.

  • update_boot_archive

    • Description:

      Update the boot archive info.

    • Implementation:

      Implemented using bootadm(1M) update-archive command.

  • update_dumpadm_nodename

    • Description:

      Update nodename and DUMPADM_ENABLE in dumpadm.conf

    • Implementation:

      Implemented using the Python built in file manipulation functions and the miscellaneous operating system interfaces module, os.

  • The ICT class supporting methods defined in file usr/src/lib/libict_pymod/ict.py are:

  • prerror(string)

    • Description:

      log error message

  • _dbg_msg(string)

    • Description:

      log output debugging message

  • info_msg(string)

    • Description:

      log informational message

  • _cmd_out(cmd)

    • Description:

      execute shell command, returning only exit status

  • _cmd_status(cmd)

    • Description:

      execute shell command, returning exit status and stdout

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact