mirror of
https://github.com/outbackdingo/ack-image-builder.git
synced 2026-01-27 10:18:13 +00:00
add script to check service tuned for aliyunlinux2
Signed-off-by: haoshuwei <haoshuwei24@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"variables": {
|
||||
"region": "cn-hangzhou",
|
||||
"image_name": "test_image{{timestamp}}",
|
||||
"source_image": "aliyun_2_1903_x64_20G_uefi_alibase_20200616.vhd",
|
||||
"source_image": "aliyun_2_1903_x64_20G_alibase_20200529.vhd",
|
||||
"instance_type": "ecs.g6.large",
|
||||
"access_key": "{{env `ALICLOUD_ACCESS_KEY`}}",
|
||||
"secret_key": "{{env `ALICLOUD_SECRET_KEY`}}"
|
||||
@@ -29,6 +29,7 @@
|
||||
"scripts/reboot.sh",
|
||||
"scripts/cleanUpKerneles.sh",
|
||||
"config/default.sh",
|
||||
"scripts/disableTuned.sh",
|
||||
"scripts/verify.sh"
|
||||
],
|
||||
"expect_disconnect": true
|
||||
|
||||
13
scripts/disableTuned.sh
Normal file
13
scripts/disableTuned.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#! /bin/bash
|
||||
|
||||
# check if image_id="aliyun_2_1903_x64_20G_alibase_20200529.vhd" and tuned service is off
|
||||
|
||||
if [ -f "/etc/image-id" ]; then
|
||||
image_id=$(cat /etc/image-id |grep image_id |cut -d "=" -f2)
|
||||
|
||||
if [ "$image_id" = "\"aliyun_2_1903_x64_20G_alibase_20200526.vhd\"" ] || [ "$image_id" = "\"aliyun_2_1903_x64_20G_alibase_20200529.vhd\"" ]; then
|
||||
systemctl stop tuned
|
||||
systemctl disable tuned
|
||||
echo "Succesfully stop and disable tuned"
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user