|
18 | 18 | #######################################
|
19 | 19 | # Validate distribution parameters
|
20 | 20 | # Globals:
|
21 |
| -# ISO_LABEL RESCUE_KERNEL ROOT_FS |
| 21 | +# ROOT_FS TMP_IN_TMPFS UEK_RELEASE RESCUE_KERNEL ISO_LABEL LINUX_FIRMWARE KERNEL_MODULES EXCLUDE_DOCS |
22 | 22 | # Arguments:
|
23 | 23 | # None
|
24 | 24 | # Returns:
|
|
27 | 27 | distr::validate() {
|
28 | 28 | [[ "${ROOT_FS,,}" =~ ^(xfs)|(btrfs)|(lvm)$ ]] || error "ROOT_FS must be xfs, btrfs or lvm"
|
29 | 29 | [[ "${ROOT_FS,,}" = "btrfs" ]] && echo_message "Note that for btrfs root filesystem you need to use an UEK boot ISO"
|
| 30 | + [[ "${TMP_IN_TMPFS,,}" =~ ^(yes)|(no)$ ]] || error "TMP_IN_TMPFS must be yes or no" |
30 | 31 | [[ "${UEK_RELEASE}" =~ ^[67]$ ]] || error "UEK_RELEASE must be 6 or 7"
|
31 | 32 | [[ "${RESCUE_KERNEL,,}" =~ ^(yes)|(no)$ ]] || error "RESCUE_KERNEL must be yes or no"
|
32 | 33 | [[ -n ${ISO_LABEL} ]] || error "ISO_LABEL must be provided"
|
33 | 34 | [[ "${LINUX_FIRMWARE,,}" =~ ^(yes)|(no)$ ]] || error "LINUX_FIRMWARE must be yes or no"
|
34 | 35 | [[ "${KERNEL_MODULES,,}" =~ ^(yes)|(no)$ ]] || error "KERNEL_MODULES must be yes or no"
|
35 | 36 | [[ "${EXCLUDE_DOCS,,}" =~ ^(yes)|(no)|(minimal)$ ]] || error "EXCLUDE_DOCS must be yes, no or minimal"
|
36 |
| - readonly ROOT_FS UEK_RELEASE RESCUE_KERNEL ISO_LABEL LINUX_FIRMWARE EXCLUDE_DOCS |
| 37 | + readonly ROOT_FS TMP_IN_TMPFS UEK_RELEASE RESCUE_KERNEL ISO_LABEL LINUX_FIRMWARE KERNEL_MODULES EXCLUDE_DOCS |
37 | 38 | }
|
38 | 39 |
|
39 | 40 | #######################################
|
@@ -101,6 +102,9 @@ logvol / --fstype=\"xfs\" --vgname=vg_main --size=4096 --name=lv_root --gr
|
101 | 102 | if [[ "${EXCLUDE_DOCS,,}" = "yes" ]]; then
|
102 | 103 | sed -i -e 's!^%packages!%packages --excludedocs!' "${ks_file}"
|
103 | 104 | fi
|
| 105 | + |
| 106 | + # /tmp in tmpfs |
| 107 | + sed -i -e "s!^TMP_IN_TMPFS=no!TMP_IN_TMPFS=$TMP_IN_TMPFS!" "${ks_file}" |
104 | 108 | }
|
105 | 109 |
|
106 | 110 | #######################################
|
|
0 commit comments