#!/bin/sh # path to the real vpnclient binary VPNCLIENTBIN=/opt/cisco-vpnclient/bin/vpnclient # path to the CPU-Hotplug facility for the second cpu. If you have a quadcore system, you # should set this value to "1 2 3" or something like this. SMP_CPUS="1" # if a connection is to be established, switch off all other CPUs if [ "$1" = "connect" ]; then for cpu in $SMP_CPUS; do echo 0 > /sys/devices/system/cpu/cpu$cpu/online done fi # start the VPN client with all given arguments $VPNCLIENTBIN $* # after the connection has been closed (either by hitting CTRL-C or by using a separate # `vpnclient disconnect` invocation, turn the CPUs back on for cpu in $SMP_CPUS; do echo 1 > /sys/devices/system/cpu/cpu$cpu/online done