Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 2.07 KB

README_PostBuild.md

File metadata and controls

36 lines (28 loc) · 2.07 KB

This script readies the chroot-dev target disk to be snapshotted and registered as an AMI.

./PostBuild.sh --help
Usage: ./PostBuild.sh [GNU long option] [option] ...
  Options:
        -f  Filesystem-type of chroo-devs (e.g., "xfs")
        -h  Print this message
        -i  User name assigned to instance default-user (default: "maintuser")
        -m  Where chroot-dev is mounted (default: "/mnt/ec2-root")
        -z  Initial timezone of build-target (default: "UTC")
  GNU long options:
        --fstype            See "-f" short-option
        --help              See "-h" short-option
        --mountpoint        See "-m" short-option
        --no-tmpfs          Disable /tmp as tmpfs behavior
        --initial-user      See "-p" short-option
        --timezone          See "-z" short-option
        --use-submgr        Do not disable subscription-manager service

Each of the functionality flag-options may also be specified by using environment variables:

  • CHROOTMNT: Stands in for the -m/--mountpoint flag-option. This env (or corresponding flags) is only necessary if the corresponding flag was used when invoking prior scripts.
  • FSTYPE: Stands in for the -f/--fstype flag-option. This env (or corresponding flags) is only necessary if the corresponding flag was used when invoking prior scripts.
  • MAINTUSR: Stands in for the -i/--initial-user flag-option. This env (or corresponding flags) is only necessary if desiring to override the username assigned to the AMI's default-user account.
  • SUBSCRIPTION_MANAGER: If set to enabled, stands in for the --use-submgr option-toggle
  • TARGTZ: Stands in for the -z/--timezone flag-option. This env (or corresponding flags) is only necessary if desiring to override AMI's default timezone-setting

Further, additional output/logging can be generated by setting the DEBUG environment variable to "true". Doing so causes information that is normally only directed to syslog to also be printed to STDOUT.

Notes:

1If invoking scripts interactively, the DEBUG value is automatically set to true.