Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing issue #129 replacing cgroup option in cmdline.txt #130

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 31 additions & 7 deletions RPiOS64-IA-Install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,24 @@ iface vmbr0 inet static
=========================================================================================
THE HOSTNAMES IN : $YELLOW /etc/hosts $NORMAL WILL BE $RED OVERWRITTEN $NORMAL !!! WITH :
127.0.0.1\tlocalhost
$RPI_IP_ONLY\t$HOSTNAME
=========================================================================================
$RPI_IP_ONLY\t$HOSTNAME"
uname -a | cut -d " " -f 3 | grep -q -E '6\.[0-9]+\.[0-9]+'
if [ $? != 0 ]
then
printf "=========================================================================================
THESE STATEMENTS WILL BE $RED ADDED $NORMAL TO THE $YELLOW /boot/cmdline.txt $NORMAL IF NONE EXISTENT :
cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1
$YELLOW=========================================================================================
#########################################################################################\n $NORMAL
"
else
printf "=========================================================================================
THESE STATEMENTS WILL BE $RED ADDED $NORMAL TO THE $YELLOW /boot/cmdline.txt $NORMAL IF NONE EXISTENT :
systemd.unified_cgroup_hierarchy=0
$YELLOW=========================================================================================
#########################################################################################\n $NORMAL
"
fi

#### PROMPT FOR CONFORMATION ############################################################################################################
read -p "YOU ARE OKAY WITH THESE CHANGES ? YOUR DECLARATIONS ARE CORRECT ? CONTINUE ? y / n : " CONFIRM
Expand Down Expand Up @@ -149,11 +160,24 @@ apt purge -y dhcpcd5
apt autoremove -y

#### FIX CONTAINER STATS NOT SHOWING UP IN WEB GUI #######################################################################################
if [ "$(cat /boot/cmdline.txt | grep cgroup)" != "" ]
then
printf "Seems to be already fixed!"
else
sed -i "1 s|$| cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1|" /boot/cmdline.txt

# Check if kernel version is over 6.X.X if true add systemd.unified_cgroup_hierarchy=0 else systemd.unified_cgroup_hierarchy=0 in /boot/cmdline.txt
name -a | cut -d " " -f 3 | grep -q -E '6\.[0-9]+\.[0-9]+'
if [ $? != 0 ]
then
if [ "$(cat /boot/cmdline.txt | grep cgroup)" != "" ]
then
printf "Seems to be already fixed!"
else
sed -i "1 s|$| cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1|" /boot/cmdline.txt
fi
else
if [ "$(cat /boot/cmdline.txt | grep unified_cgroup)" != "" ]
then
printf "Seems to be already fixed!"
else
sed -i "1 s|$| systemd.unified_cgroup_hierarchy=0|" /boot/cmdline.txt
fi
fi

#### INSTALL PIMOX7 AND REBOOT ###########################################################################################################
Expand Down