File: cpu_online

package info (click to toggle)
clonezilla 5.12.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 4,580 kB
  • sloc: sh: 41,014; perl: 193; python: 59; makefile: 26
file content (13 lines) | stat: -rwxr-xr-x 410 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
if [ -z "$(grep -Ew ocs_1_cpu_udev /proc/cmdline)" ]; then
  # Skip if ocs_1_cpu_udev does not exist.
  exit 6
fi
echo "Enabling SMP-like behavior after udev was started... "
for cpu in `ls -dv /sys/devices/system/cpu/cpu[1-9]*`; do
    if [ -e "$cpu/online" ]; then
        echo -n "$(basename $cpu), "
	(echo 1 > "$cpu/online" 2>/dev/null || echo "Failed to enable $cpu")&
    fi
done
echo "done!"