Linux Lite 8.0 RC1 has been released - Click here


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Kernel Installer Tweak
#1

Jerry attached is the proposed code for Kernel Installer Tweak (since we have Kernel Removal I think Kernel Installer would be a suitable name :P )


https://unlockforus.com

Sorry for seeming stupid and preferring Linux - I just don't know any better.

[Image: AGxgqJ6.png]
Reply
#2

Thanks, will look at this soon.

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply
#3

Happy to include this in Lite Tweaks. Can we have it output info when it is downloading and installing like it does in Install Updates?

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply
#4

(04-28-2017, 07:01 AM)Jerry link Wrote:  Happy to include this in Lite Tweaks. Can we have it output info when it is downloading and installing like it does in Install Updates?

We could probably do some logging there as well if needed but there is really no in-between... it either downloads it and installs it or it doesn't.

https://unlockforus.com

Sorry for seeming stupid and preferring Linux - I just don't know any better.

[Image: AGxgqJ6.png]
Reply
#5

Not fussed either way.

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply
#6

Hi Jerry,

Kernel Installer tweak is now ready. I have included logs for failures only and not for successful installations. In case of failure, users will be prompted if they want to review the logs. A dialog with the logs will be shown if users want to review it, as well as it provides options to save it.

I have included a common function in lite-tweaks-super (top of the file):

Code:
# common functions
TWEAK_LOGS() {
_LTLOGS="/tmp/ltlogs.log"
touch "$_LTLOGS"; chown "$_MYLTUSER":"$_MYLTUSER" "$_LTLOGS"; chmod 600 "$_LTLOGS"
}

... so that we can use that same function to log other tweaks or options in the future without having to set it for each tweak.

Will be pushing it to master so you can test it too in a bit.

https://unlockforus.com

Sorry for seeming stupid and preferring Linux - I just don't know any better.

[Image: AGxgqJ6.png]
Reply
#7

Fantastic Ralphy, will test this soon :)

Note, there is a new addition to the family that will require some code adjustments, see here for more information - https://www.linuxliteos.com/forums/insta.../#msg31655

I'm very focused on the search function in the Help manual and hope to get it out this or next week.

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply
#8

Ermm... how did it jump from 4.7 to 4.11? Did we miss to add 4.8, 4.9 and 4.10 to that initial code or isn't available in the repo?

Yeah, we have to add some conditions  to make it find and pull the correct firmware-image cos' right now it wont work.


https://unlockforus.com

Sorry for seeming stupid and preferring Linux - I just don't know any better.

[Image: AGxgqJ6.png]
Reply
#9

I've banged my head against the keyboard trying to figure out how to compare the darn kernel numbers to create the condition (facepalm) . Either it ain't my day to code today or I can't figure it out because using awk or bc does not return the results we need. We can recur to other options but it will add much more code than what it needs for what we're doing at this point.

For example:

Code:
echo "4.7 < 4.11" | bc -l

The above will return a ZERO which means that bc finds 4.7 greater than 4.11 cos it assumes 4.7 as 4.70. Same thing with awk...  :-\

So, I'm going to hard code it. It will be "ugly" but it will be functional:

Code:
if [ "$KERNLIST" == "4.11.0" ] || if [ "$KERNLIST" == "4.12.0" ] ; then
   download and install new firmware
else
   download and install previous versions
fi

... and middle finger rises up!  >:(

https://unlockforus.com

Sorry for seeming stupid and preferring Linux - I just don't know any better.

[Image: AGxgqJ6.png]
Reply
#10

Never mind, this tweak is "garbage" if we have to manually update it every time a new kernel is released. Besides, the user may be using a mirror where the kernel isn't sync'd yet and we will giving them an option for a kernel that can't be installed at that time.

I have to recode this tweak and make it more dynamic... something we set and forget... I think we can get it done by sorting with apt search... that will give us an exact output of what the user is getting from the mirror and we won't have to update the tweak on every new kernel push. I'll get something in that line...

https://unlockforus.com

Sorry for seeming stupid and preferring Linux - I just don't know any better.

[Image: AGxgqJ6.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)