[Why] 1. 'key difference' of ks for different physical machine: - http install source. - install target disk/partition. - working nic.
2. 'other ks content' for different os is different.
so the change is as following: before: 'other ks content' is all same. after : add a httpd dir, which stores the 'other ks content' for different os, then they only need generate the 'key difference' related to current physical machine, 'other ks content' can download from httpd.
Signed-off-by: Yu Chuan 13186087857@163.com --- tests/install-iso-pre | 43 +++++++++---------------------------------- 1 file changed, 9 insertions(+), 34 deletions(-)
diff --git a/tests/install-iso-pre b/tests/install-iso-pre index c89895a994cc..f9ff9ebe9e94 100755 --- a/tests/install-iso-pre +++ b/tests/install-iso-pre @@ -91,6 +91,13 @@ prepare_lv() create_lv }
+append_ks_template() +{ + wget -O ${ks_file}.tmp http://$%7BOS_HTTP_HOST%7D:$%7BOS_HTTP_PORT%7D/os/install/ks/template/$%7Bis... + cat ${ks_file}.tmp >> $ks_file + rm -rf ${ks_file}.tmp +} + generate_ks() { log_info "start generate $ks_file" @@ -112,41 +119,9 @@ generate_ks() bootloader --location=none logvol / --vgname=${VG_NAME} --name=${LV_NAME} --useexisting
- # Root password - rootpw --iscrypted ${secrets_ROOTFS_ROOT_PASSWD} - - # Reboot after installation - reboot --eject - - # Use text mode install - text - - # Keyboard layouts - keyboard --vckeymap=us --xlayouts='us' - - # System language - lang en_US.UTF-8 - - # Do not configure the X Window System - skipx - - # System services - services --enabled="chronyd" - - # System timezone - timezone Asia/Shanghai --isUtc - - %packages - @^minimal-environment - - %end - - %anaconda - pwpolicy root --minlen=8 --minquality=1 --notstrict --nochanges --notempty - pwpolicy user --minlen=8 --minquality=1 --notstrict --nochanges --emptyok - pwpolicy luks --minlen=8 --minquality=1 --notstrict --nochanges --notempty - %end EOF + + append_ks_template }
upload_ks()
On Fri, Apr 23, 2021 at 12:03:34PM +0800, Yu Chuan wrote:
[Why]
- 'key difference' of ks for different physical machine:
- http install source.
- install target disk/partition.
- working nic.
- 'other ks content' for different os is different.
so the change is as following: before: 'other ks content' is all same. after : add a httpd dir, which stores the 'other ks content' for different os, then they only need generate the 'key difference' related to current physical machine, 'other ks content' can download from httpd.
Signed-off-by: Yu Chuan 13186087857@163.com
tests/install-iso-pre | 43 +++++++++---------------------------------- 1 file changed, 9 insertions(+), 34 deletions(-)
diff --git a/tests/install-iso-pre b/tests/install-iso-pre index c89895a994cc..f9ff9ebe9e94 100755 --- a/tests/install-iso-pre +++ b/tests/install-iso-pre @@ -91,6 +91,13 @@ prepare_lv() create_lv }
+append_ks_template() +{
- wget -O ${ks_file}.tmp http://$%7BOS_HTTP_HOST%7D:$%7BOS_HTTP_PORT%7D/os/install/ks/template/$%7Bis...
- cat ${ks_file}.tmp >> $ks_file
- rm -rf ${ks_file}.tmp
better to use 'curl xxx' >> $ks_file
Thanks, Dewan
+}
generate_ks() { log_info "start generate $ks_file" @@ -112,41 +119,9 @@ generate_ks() bootloader --location=none logvol / --vgname=${VG_NAME} --name=${LV_NAME} --useexisting
- # Root password
- rootpw --iscrypted ${secrets_ROOTFS_ROOT_PASSWD}
- # Reboot after installation
- reboot --eject
- # Use text mode install
- text
- # Keyboard layouts
- keyboard --vckeymap=us --xlayouts='us'
- # System language
- lang en_US.UTF-8
- # Do not configure the X Window System
- skipx
- # System services
- services --enabled="chronyd"
- # System timezone
- timezone Asia/Shanghai --isUtc
- %packages
- @^minimal-environment
- %end
- %anaconda
- pwpolicy root --minlen=8 --minquality=1 --notstrict --nochanges --notempty
- pwpolicy user --minlen=8 --minquality=1 --notstrict --nochanges --emptyok
- pwpolicy luks --minlen=8 --minquality=1 --notstrict --nochanges --notempty
- %end EOF
- append_ks_template
}
upload_ks()
2.23.0
- wget -O ${ks_file}.tmp http://$%7BOS_HTTP_HOST%7D:$%7BOS_HTTP_PORT%7D/os/install/ks/template/$%7Bis...
- cat ${ks_file}.tmp >> $ks_file
- rm -rf ${ks_file}.tmp
better to use 'curl xxx' >> $ks_file
good.
-------- Thanks Yu Chuan
Thanks, Dewan
+}
generate_ks() { log_info "start generate $ks_file" @@ -112,41 +119,9 @@ generate_ks() bootloader --location=none logvol / --vgname=${VG_NAME} --name=${LV_NAME} --useexisting
- # Root password
- rootpw --iscrypted ${secrets_ROOTFS_ROOT_PASSWD}
- # Reboot after installation
- reboot --eject
- # Use text mode install
- text
- # Keyboard layouts
- keyboard --vckeymap=us --xlayouts='us'
- # System language
- lang en_US.UTF-8
- # Do not configure the X Window System
- skipx
- # System services
- services --enabled="chronyd"
- # System timezone
- timezone Asia/Shanghai --isUtc
- %packages
- @^minimal-environment
- %end
- %anaconda
- pwpolicy root --minlen=8 --minquality=1 --notstrict --nochanges --notempty
- pwpolicy user --minlen=8 --minquality=1 --notstrict --nochanges --emptyok
- pwpolicy luks --minlen=8 --minquality=1 --notstrict --nochanges --notempty
- %end EOF
- append_ks_template
}
upload_ks()
2.23.0