[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Stretch] apt-get has no updates?



On Sun, Jul 2, 2017 at 5:10 AM, Dejan Jocic <jodejka@gmail.com> wrote:
> On 01-07-17, Larry Dighera wrote:
>> 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
>>
>> =================================================================================
>>
>
> Why would you do that? Write and use script to change one 0/1 in
> /etc/apt/apt.conf/20auto-upgrades? Or even 2, in case that you change
> both for update and upgrade. Not to mention that those using gnome
> software or some kde equivalent can do it in GUI too.

At any rate, the script seems to show where the flags are and what
they look like.

-- 
Joel Rees

One of these days I'll get someone to pay me
to design a language that combines the best of Forth and C.
Then I'll be able to leap wide instruction sets with a single #ifdef,
run faster than a speeding infinite loop with a #define,
and stop all integer size bugs with my bare cast.
http://defining-computers.blogspot.com/2017/06/reinventing-computers.html

More of my delusions:
http://reiisi.blogspot.com/2017/05/do-not-pay-modern-danegeld-ransomware.html
http://reiisi.blogspot.jp/p/novels-i-am-writing.html


Reply to: