Update config add file

master-b4
Alan Johnston 1 month ago committed by GitHub
parent 775c4c381c
commit 6ddb9af4e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2237,7 +2237,9 @@ elif [ "$1" = "-V" ]; then
echo "Changing the maxcpus setting" echo "Changing the maxcpus setting"
echo echo
CPUS=$(cat /boot/firmware/cmdline.txt| grep -oP 'maxcpus=\K\d+') CMDLINE=/boot/firmware/cmdline.txt
CPUS=$(cat $CMDLINE| grep -oP 'maxcpus=\K\d+')
if [ -z "$param2" ] ; then if [ -z "$param2" ] ; then
@ -2255,7 +2257,7 @@ elif [ "$1" = "-V" ]; then
sudo sed -i 's/maxcpus=$CPUS//g' sudo sed -i 's/maxcpus=$CPUS//g'
echo "Removing maxcpus setting" echo "Removing maxcpus setting"
elif [ $NEWCPU == "1" ] || [ $NEWCPU == "2" ] || [ $NEWCPU == "3" ] ; then elif [ $NEWCPU == "1" ] || [ $NEWCPU == "2" ] || [ $NEWCPU == "3" ] ; then
sudo sed -i 's/maxcpus=$CPUS/maxcpus=$NEWCPU/g' sudo sed -i 's/maxcpus=$CPUS/maxcpus=$NEWCPU/g' $CMDLINE
echo "Setting maxcpus="$NEWCPU echo "Setting maxcpus="$NEWCPU
else else
echo "Invalid maxcpus setting. No change made." echo "Invalid maxcpus setting. No change made."
@ -2265,7 +2267,7 @@ elif [ "$1" = "-V" ]; then
if [ "$param2" == "1" ] || [ "$param2" == "2" ] || [ "$param2" == "3" ] ; then if [ "$param2" == "1" ] || [ "$param2" == "2" ] || [ "$param2" == "3" ] ; then
sudo sed -i 's/maxcpus=$CPUS/maxcpus=$param2/g' sudo sed -i 's/maxcpus=$CPUS/maxcpus=$param2/g' $CMDLINE
echo "Setting maxcpus="$param2 echo "Setting maxcpus="$param2
else else

Loading…
Cancel
Save

Powered by TurnKey Linux.