Re: [Stretch] apt-get has no updates?
- To: ravenlx@sitesplace.net
- Cc: debian-user@lists.debian.org
- Subject: Re: [Stretch] apt-get has no updates?
- From: Larry Dighera <LDighera@att.net>
- Date: Sat, 01 Jul 2017 12:54:10 -0700
- Message-id: <[🔎] 0luflc5b3sve1tsa41q7mcqng5eslipl95@4ax.com>
- In-reply-to: <ed8c52f1-638c-dacc-70fe-0ae0c21038b5@sitesplace.net>
- References: <1fbfbd3b-55ff-3c31-48c1-47c4a9a7c22f@sitesplace.net> <20170630140422.GK4028@eeg.ccf.org> <135aad5c-ef97-d63f-7cb2-fce2126e8d71@sitesplace.net> <20170630143018.GL4028@eeg.ccf.org> <ed8c52f1-638c-dacc-70fe-0ae0c21038b5@sitesplace.net>
On Fri, 30 Jun 2017 16:31:37 -0400, you wrote:
>> Someone else mentioned unattended upgrades, which is a thing I have
>> never used, and which is also a thing I would disable if I ever found
>> it running. But that's just me.
>
>I would like to do that but don't know how. Anyone caring to enlighten
>me without me having to bother poor old Mr. Google yet again - it would
>be appreciated. :)
Perhaps you'll find this useful:
===========================================================================
# auto-update-on-off.sh This script will enable and disable
unattended-updates
#
# LGD: Thu Jun 1 15:00:09 PDT 2017
#
[[ $# != 1 ]] && echo -e "\n\t\"$@\" Unknown\n\tUsage: $0 <e|d|s>
\n\t\tWhere: e = Enable\n\t\t\td = Disable\n\t\t\ts = Status" >&2 &&
exit 1
FILNAM="/etc/apt/apt.conf.d/10periodic"
OFF="APT::Periodic::Unattended-Upgrade \"0\";"
ON="APT::Periodic::Unattended-Upgrade \"1\";"
status(){ # Get current status
if [[ -s "$FILNAM" ]] ;then # Does file exist with >0 file
length?
[[ $(grep -qs 1 "$FILNAM") ]] && STATUS=Enabled
[[ $(grep -qs 0 "$FILNAM") ]] && STATUS=Disabled
else
STATUS="Not Configured (Disabled)"
fi
return $STATUS
}
case $1 in
-[sS]*) status; echo "Current $0 status: $STATUS">&2;exit 0 ;;
-[dD]*) echo "$OFF" >/etc/apt/apt.conf.d/10periodic ;;
-[eE]*) echo "$ON" >/etc/apt/apt.conf.d/10periodic ;;
*) echo -e "\n\t\"$@\" Unknown\n\tUsage: $0 <e|d|s> \n\t\tWhere: e
= Enable\n\t\t\td = Disable\n\t\t\ts = Status" >&2 && exit 1
esac
=================================================================================
Reply to: