diff --git a/misc/config_tools/launch_config/com.py b/misc/config_tools/launch_config/com.py index 00871b797..be137d411 100644 --- a/misc/config_tools/launch_config/com.py +++ b/misc/config_tools/launch_config/com.py @@ -95,9 +95,9 @@ def off_line_cpus(args, vmid, uos_type, config): print(" for j in {}; do".format(' '.join([str(i) for i in pcpu_id_list])), file=config) print(' if [ "cpu"$j = $i ]; then', file=config) print(' online=`cat ${cpu_path}/$i/online`', file=config) - print(' idx=`echo $i | tr -cd "[1-99]"`', file=config) + print(' idx=`echo $i | tr -cd "[0-9]"`', file=config) print(' echo $i online=$online', file=config) - print(' if [ "$online" = "1" ]; then', file=config) + print(' if [ "$online" = "1" ] && [ "$idx" != "0" ]; then', file=config) print(" echo 0 > ${cpu_path}/$i/online", file=config) print(" online=`cat ${cpu_path}/$i/online`", file=config) print(" # during boot time, cpu hotplug may be disabled by pci_device_probe during a pci module insmod", file=config)