Jump to content

Kernel update script (semthex 10.4.8)


  • Please log in to reply
45 replies to this topic

#1
hippiex

hippiex

    InsanelyMac Protégé

  • Members
  • Pip
  • 23 posts
Hello there,
since yesterday ive being working on a new version of the update script first coded by Prasys... the main feature is a md5 check between the current running kernel and the package available from semthex site, to avoid unecessary downloads. Ive also changed the way things go on the script to avoid any problem during the update process, making it safer.

I'll be very happy to implement new features, so if u got any idea just let me know =)


################################################################################
#
# Update script for the Semthex Kernel.
# Coded by hippiex
# ----------------------------------
# Thanks to Prasys
# (he made the first update script)
# ----------------------------------
# Thanks to:
# Rammjet ideas:
# 05/12/2006
# proper zip package
# Double-clickable script
# sudo on code
# kernel release check (8.8.1)
# 06/12/2006
# In some cases ppl might be upgrading from a 8.4.1 release
# (paulicat method).
#
# dussel idea: 06/12/2006
# http-proxy
#
# cardinal idea: 06/12/2006
# Changed the order to move the
# new kernel.
#
# your idea: Let me know!! 8-)
# ----------------------------------
# Releases:
# 18/01/07 0.6 - Semthex has changed his kernel download link. It is
# 6/12/06 0.5 - Safer way to move new kernel
# Allow upgrade from 8.4.1 kernel (paulicat method)
# 6/12/06 0.4 - Added http-proxy support.
# 5/12/06 0.3 - Added some pre reqs checks.
# 5/12/06 0.2 - Sudo included on code
# 5/12/06 0.1 - first beta version 8-)
#
################################################################################

Notes:
1 - To configure the script to download the update using a http-proxy, just edit the script file with TextEdit and change the variable useproxy="no" to useproxy="yes". Let me know if u need proxy+auth.
2 - Now the script allows users running the 8.4.1 kernel to update to latest 10.4.8/8.8.1, respecting some upgrade methodes (ex: Paulicat methode). It will show a Warning message and users will be able to decide the right thing to do. (Big thanks to Rammjet).

-- hippiex

Attached Files


Edited by hippiex, 18 January 2007 - 10:33 AM.


#2
Rammjet

Rammjet

    InsanelyMac V.I.P.

  • Gurus
  • 5,302 posts
  • Gender:Male
If you set the script executable and then zip it, it should still be execuatble when downloaded. Otherwise, right now, the user needs to know how to set the executable bit.

Also, if you add "sudo" in the script to the particular commands needing root, the user wouldn't be foreced to operate as root before getting into the script. On first instance of sudo, the system will ask for password. If the script is sufficiently fast (which it should be), none of the other sudo commands will trigger a request for password - and if they do, the user will just have to comply.

Otherwise, looks very good.

Also, making it a suffix of .command it will be a double-clickable script.

#3
hippiex

hippiex

    InsanelyMac Protégé

  • Members
  • Pip
  • 23 posts

If you set the script executable and then zip it, it should still be execuatble when downloaded. Otherwise, right now, the user needs to know how to set the executable bit.


Done

Also, if you add "sudo" in the script to the particular commands needing root, the user wouldn't be foreced to operate as root before getting into the script. On first instance of sudo, the system will ask for password. If the script is sufficiently fast (which it should be), none of the other sudo commands will trigger a request for password - and if they do, the user will just have to comply.


Done

Otherwise, looks very good.


Thanks bro!

Also, making it a suffix of .command it will be a double-clickable script.


Done



Ive alse set a check for the processor type, to avoid problems with PPC users..

Thanks for the tips.
hippiex

#4
Korrupted

Korrupted

    Wandering Samurai

  • Retired
  • 1,623 posts
  • Location:Wandering the world over.
  • Interests:Mac<br />Laptops
Fixed your quotes for you.

#5
hippiex

hippiex

    InsanelyMac Protégé

  • Members
  • Pip
  • 23 posts
Please download the pkg again...

There were 1 error on it. now it is fixed.


[]s
hippiex

#6
Prasys

Prasys

    Cheese Cheese cheese

  • Retired Developers
  • 338 posts
  • Gender:Male
With your permission , I am thinking of adding some extras to my script , I will just remod the script back of yours and include the changes to mine. Thinking of adding a ping test or something like that

#7
dussel

dussel

    InsanelyMac Protégé

  • Members
  • Pip
  • 6 posts
Hi hippiex,

can you add to your script http-Proxy-Support?

Dussel

#8
hippiex

hippiex

    InsanelyMac Protégé

  • Members
  • Pip
  • 23 posts

Hi hippiex,

can you add to your script http-Proxy-Support?

Dussel


Hi Dussel,
sure, ill work on it as soon as i get home.. keep watching the thread :)

Cheers,
hippiex

#9
hippiex

hippiex

    InsanelyMac Protégé

  • Members
  • Pip
  • 23 posts

can you add to your script http-Proxy-Support?

It was added to the script, please download it again. Remember to configure it ( read the notes on the first post )

[]
hippiex

#10
cardinal

cardinal

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 124 posts
A very minor suggestion... instead of
mv /kernel/mach_kernel /mach_kernel
chmod 644 /mach_kernel
chown root:wheel /mach_kernel
put
chmod 644 /kernel/mach_kernel
chown root:wheel /kernel/mach_kernel
mv /kernel/mach_kernel /mach_kernel
This way, should system crash right after mv command, kernel will still have correct attributes. Not that this is very likely, but just as a matter of principle :(

#11
hippiex

hippiex

    InsanelyMac Protégé

  • Members
  • Pip
  • 23 posts

chmod 644 /kernel/mach_kernel
chown root:wheel /kernel/mach_kernel
mv /kernel/mach_kernel /mach_kernel
This way, should system crash right after mv command, kernel will still have correct attributes. Not that this is very likely, but just as a matter of principle :hysterical:


Thank you for the advice, it is now fixed + it now allow users upgrading from 8.4.1 to use it as well (more info on notes )

Thanks again =)
-- hippiex

#12
Prasys

Prasys

    Cheese Cheese cheese

  • Retired Developers
  • 338 posts
  • Gender:Male
I will merge some of the changes......like the version checking...

#13
hippiex

hippiex

    InsanelyMac Protégé

  • Members
  • Pip
  • 23 posts

I will merge some of the changes......like the version checking...


Hey Prasys,
im glad u liked it... please let me know if you have any idea for the script. I was coding the connection check, but when i was coding it i tought that it is not necessary because the download function (curl) will report any error (including a connect problem). Tonight ill release another version...

[]s
hippiex

#14
Rammjet

Rammjet

    InsanelyMac V.I.P.

  • Gurus
  • 5,302 posts
  • Gender:Male

that it is not necessary because the download function (curl) will report any error (including a connect problem).

Yup, as long as you check the different return codes. Don't want the user trying to diagnose an internet connection problem if the problem is that the server is down or the file is no longer available.

#15
joe75

joe75

    Revolutionary

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,019 posts
  • Gender:Male
  • Location:Rochester, NY

Don't want the user trying to diagnose an internet connection problem if the problem is that the server is down or the file is no longer available.


Like that could ever happen :idea:

#16
B612

B612

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 463 posts
A very stupid thing: it is not related to the script but to English.

You don't say "Disclimair", but "Disclaimer". :)

For the rest, congrats and thank you!

#17
dussel

dussel

    InsanelyMac Protégé

  • Members
  • Pip
  • 6 posts
Hi hippiex,

thanks to implement the http-Support and its works great. In my case i do not need proxy+auth.
It is possible to display before the update begins the current and new Kernel Version with date and version like:

Current Kernel: xxxxxx
New Kernel: xxxxxx

DUssel

#18
hippiex

hippiex

    InsanelyMac Protégé

  • Members
  • Pip
  • 23 posts

It is possible to display before the update begins the current and new Kernel Version with date and version like:

Current Kernel: xxxxxx
New Kernel: xxxxxx


Hello Dussel,
Sure it is possible, ill code it on monday (coz weekends r the girlfriend day :-) ). Keep watching the thread ...

[]s
hippiex

#19
ishikawa

ishikawa

    InsanelyMac Protégé

  • Members
  • Pip
  • 10 posts
does it work on a 10.4.8 jas amd combo update with 8.4.1 Kernel??

#20
Rammjet

Rammjet

    InsanelyMac V.I.P.

  • Gurus
  • 5,302 posts
  • Gender:Male
The script will work, but the version of 10.4.8 you are running is incomplete. You need to upgrade your 10.4.8 installation using the Apple Intel 10.4.8 Combo update and some other things. Then the new kernel will work.

Look over the 10.4.8 link in my signature.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   Web hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy