Documentation
¶
Index ¶
- Constants
- func GetBuildKeyEnvMap() map[string]string
- func GetCloudInitPaths() []string
- func GetDefaultSquashfsCompressionOptions() []string
- func GetDefaultSquashfsOptions() []string
- func GetDiskKeyEnvMap() map[string]string
- func GetISOKeyEnvMap() map[string]string
- func GetInitKeyEnvMap() map[string]string
- func GetInstallKeyEnvMap() map[string]string
- func GetResetKeyEnvMap() map[string]string
- func GetRunKeyEnvMap() map[string]string
- func GetUpgradeKeyEnvMap() map[string]string
Constants ¶
const ( GrubConf = "/etc/cos/grub.cfg" GrubOEMEnv = "grub_oem_env" GrubEnv = "grubenv" GrubDefEntry = "Elemental" BiosPartName = "bios" EfiLabel = "COS_GRUB" EfiPartName = "efi" ActiveLabel = "COS_ACTIVE" PassiveLabel = "COS_PASSIVE" SystemLabel = "COS_SYSTEM" RecoveryLabel = "COS_RECOVERY" RecoveryPartName = "recovery" StateLabel = "COS_STATE" StatePartName = "state" InstallStateFile = "state.yaml" PersistentLabel = "COS_PERSISTENT" PersistentPartName = "persistent" OEMLabel = "COS_OEM" OEMPartName = "oem" ActiveImgName = "active" PassiveImgName = "passive" RecoveryImgName = "recovery" MountBinary = "/usr/bin/mount" EfiDevice = "/sys/firmware/efi" LinuxFs = "ext4" LinuxImgFs = "ext2" SquashFs = "squashfs" EfiFs = "vfat" BiosFs = "" MinPartSize = uint(64) EfiSize = MinPartSize OEMSize = MinPartSize StateSize = uint(8192) RecoverySize = uint(4096) PersistentSize = uint(0) BiosSize = uint(1) ImgSize = uint(0) ImgOverhead = uint(256) HTTPTimeout = 60 CosSetup = "/usr/bin/cos-setup" GPT = "gpt" BuildImgName = "elemental" UsrLocalPath = "/usr/local" OEMPath = "/oem" ConfigDir = "/etc/elemental" // Mountpoints of images and partitions RecoveryDir = "/run/cos/recovery" StateDir = "/run/cos/state" OEMDir = "/run/cos/oem" PersistentDir = "/run/cos/persistent" ActiveDir = "/run/cos/active" TransitionDir = "/run/cos/transition" EfiDir = "/run/cos/efi" ImgSrcDir = "/run/cos/imgsrc" WorkingImgDir = "/run/cos/workingtree" RunningStateDir = "/run/initramfs/cos-state" // TODO: converge this constant with StateDir/RecoveryDir in dracut module from cos-toolkit // Live image mountpoints ISOBaseTree = "/run/rootfsbase" LiveDir = "/run/initramfs/live" // Image file names ActiveImgFile = "active.img" PassiveImgFile = "passive.img" RecoveryImgFile = "recovery.img" TransitionImgFile = "transition.img" // Yip stages evaluated on reset/upgrade/install/build-disk actions AfterInstallChrootHook = "after-install-chroot" AfterInstallHook = "after-install" PostInstallHook = "post-install" BeforeInstallHook = "before-install" AfterResetChrootHook = "after-reset-chroot" AfterResetHook = "after-reset" PostResetHook = "post-reset" BeforeResetHook = "before-reset" AfterUpgradeChrootHook = "after-upgrade-chroot" AfterUpgradeHook = "after-upgrade" PostUpgradeHook = "post-upgrade" BeforeUpgradeHook = "before-upgrade" AfterDiskChrootHook = "after-disk-chroot" AfterDiskHook = "after-disk" PostDiskHook = "post-disk" BeforeDiskHook = "before-disk" // SELinux targeted policy paths SELinuxTargetedPath = "/etc/selinux/targeted" SELinuxTargetedContextFile = SELinuxTargetedPath + "/contexts/files/file_contexts" SELinuxTargetedPolicyPath = SELinuxTargetedPath + "/policy" // Kernel and initrd paths are arbitrary and coupled to grub.cfg ISOKernelPath = "/boot/x86_64/loader/linux" ISOInitrdPath = "/boot/x86_64/loader/initrd" ISORootFile = "rootfs.squashfs" ISOEFIImg = "uefi.img" ISOLabel = "COS_LIVE" ISOCloudInitPath = LiveDir + "/iso-config" // Constants related to disk builds DiskWorkDir = "build" RawType = "raw" AzureType = "azure" GCEType = "gce" // Default directory and file fileModes DirPerm = os.ModeDir | os.ModePerm FilePerm = 0666 NoWriteDirPerm = 0555 | os.ModeDir TempDirPerm = os.ModePerm | os.ModeSticky | os.ModeDir // Eject script EjectScript = "#!/bin/sh\n/usr/bin/eject -rmF" ArchAmd64 = "amd64" Archx86 = "x86_64" ArchArm64 = "arm64" ArchAarch64 = "aarch64" Fedora = "fedora" Ubuntu = "ubuntu" Suse = "suse" Rsync = "rsync" )
Variables ¶
This section is empty.
Functions ¶
func GetBuildKeyEnvMap ¶
GetBuildKeyEnvMap returns environment variable bindings to BuildConfig data
func GetCloudInitPaths ¶
func GetCloudInitPaths() []string
func GetDefaultSquashfsCompressionOptions ¶
func GetDefaultSquashfsCompressionOptions() []string
func GetDefaultSquashfsOptions ¶
func GetDefaultSquashfsOptions() []string
GetDefaultSquashfsOptions returns the default options to use when creating a squashfs
func GetDiskKeyEnvMap ¶
GetDiskKeyEnvMap returns environment variable bindings to RawDisk data
func GetISOKeyEnvMap ¶
GetISOKeyEnvMap returns environment variable bindings to LiveISO data
func GetInitKeyEnvMap ¶
GetInitKeyEnvMap returns environment variable bindings to InitSpec data
func GetInstallKeyEnvMap ¶
GetInstallKeyEnvMap returns environment variable bindings to InstallSpec data
func GetResetKeyEnvMap ¶
GetResetKeyEnvMap returns environment variable bindings to ResetSpec data
func GetRunKeyEnvMap ¶
GetRunKeyEnvMap returns environment variable bindings to RunConfig data
func GetUpgradeKeyEnvMap ¶
GetUpgradeKeyEnvMap returns environment variable bindings to UpgradeSpec data
Types ¶
This section is empty.