You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which platform does your requested change effect?
Linux/UbuntuLTS
**Is your feature request related to a problem? **
In the "Configure automatic updates" section of the Ubuntu-LTS-post-install.sh script, it appears to be deleting some lines inside two files, and rewritting them with the apropriate value, however, this is only done if a previous grep command is not able to locate the text inside this files. I have done some tests and as this lines are contained previously in this files, the code never executes and the values stored in the files never change. I'm not sure if this is the spected behaviour for this code, but in my tests it usually affects on the autocleaninterval not being set up weekly.
Following is the code mentioned above.
Configure automatic updates.
echo -e "${HIGHLIGHT}Configuring automatic updates...${NC}"
EXISTS=$(grep "APT::Periodic::Update-Package-Lists" /etc/apt/apt.conf.d/20auto-upgrades)
if [ -z "$EXISTS" ]; then
sed -i '/APT::Periodic::Update-Package-Lists/d' /etc/apt/apt.conf.d/20auto-upgrades
echo "APT::Periodic::Update-Package-Lists "1";" >> /etc/apt/apt.conf.d/20auto-upgrades
fi
EXISTS=$(grep "APT::Periodic::Unattended-Upgrade" /etc/apt/apt.conf.d/20auto-upgrades)
if [ -z "$EXISTS" ]; then
sed -i '/APT::Periodic::Unattended-Upgrade/d' /etc/apt/apt.conf.d/20auto-upgrades
echo "APT::Periodic::Unattended-Upgrade "1";" >> /etc/apt/apt.conf.d/20auto-upgrades
fi
EXISTS=$(grep "APT::Periodic::AutocleanInterval" /etc/apt/apt.conf.d/10periodic)
if [ -z "$EXISTS" ]; then
sed -i '/APT::Periodic::AutocleanInterval/d' /etc/apt/apt.conf.d/10periodic
echo "APT::Periodic::AutocleanInterval "7";" >> /etc/apt/apt.conf.d/10periodic
fi
The text was updated successfully, but these errors were encountered:
Which platform does your requested change effect?
Linux/UbuntuLTS
**Is your feature request related to a problem? **
In the "Configure automatic updates" section of the Ubuntu-LTS-post-install.sh script, it appears to be deleting some lines inside two files, and rewritting them with the apropriate value, however, this is only done if a previous grep command is not able to locate the text inside this files. I have done some tests and as this lines are contained previously in this files, the code never executes and the values stored in the files never change. I'm not sure if this is the spected behaviour for this code, but in my tests it usually affects on the autocleaninterval not being set up weekly.
Following is the code mentioned above.
Configure automatic updates.
echo -e "${HIGHLIGHT}Configuring automatic updates...${NC}"
EXISTS=$(grep "APT::Periodic::Update-Package-Lists" /etc/apt/apt.conf.d/20auto-upgrades)
if [ -z "$EXISTS" ]; then
sed -i '/APT::Periodic::Update-Package-Lists/d' /etc/apt/apt.conf.d/20auto-upgrades
echo "APT::Periodic::Update-Package-Lists "1";" >> /etc/apt/apt.conf.d/20auto-upgrades
fi
EXISTS=$(grep "APT::Periodic::Unattended-Upgrade" /etc/apt/apt.conf.d/20auto-upgrades)
if [ -z "$EXISTS" ]; then
sed -i '/APT::Periodic::Unattended-Upgrade/d' /etc/apt/apt.conf.d/20auto-upgrades
echo "APT::Periodic::Unattended-Upgrade "1";" >> /etc/apt/apt.conf.d/20auto-upgrades
fi
EXISTS=$(grep "APT::Periodic::AutocleanInterval" /etc/apt/apt.conf.d/10periodic)
if [ -z "$EXISTS" ]; then
sed -i '/APT::Periodic::AutocleanInterval/d' /etc/apt/apt.conf.d/10periodic
echo "APT::Periodic::AutocleanInterval "7";" >> /etc/apt/apt.conf.d/10periodic
fi
The text was updated successfully, but these errors were encountered: