ALT Linux Bugzilla
– Attachment 952 Details for
Bug 7202
Добавить скрипт обновления ядра
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
Kernel update
update_kernel.sh (text/plain), 1.52 KB, created by
Vitaly Lipatov
on 2005-06-25 02:36:08 MSD
(
hide
)
Description:
Kernel update
Filename:
MIME Type:
Creator:
Vitaly Lipatov
Created:
2005-06-25 02:36:08 MSD
Size:
1.52 KB
patch
obsolete
>#!/bin/sh -v ># Vitaly Lipatov <lav@etersoft.ru>, 2004-2005 ># Updates kernel of current type (std-up, std26-up, etc.) ># to newest version (with all installed modules). ># You can set type of kernel as first argument of the script. > ># õÓÔÁÎÁ×ÌÉ×ÁÅÔ ÓÁÍÏÅ ÎÏ×ÏÅ ÑÄÒÏ ># ïÂÎÏ×ÌÑÅÔ ÕÖÅ ÕÓÔÁÎÏ×ÌÅÎÎÙÅ ÍÏÄÕÌÉ ÄÏ ×ÅÒÓÉÉ ># ÄÌÑ ÓÁÍÏÇÏ ÎÏ×ÏÇÏ ÕÓÔÁÎÏ×ÌÅÎÎÏÇÏ ÑÄÒÁ ># íÏÖÎÏ ÕËÁÚÁÔØ ÔÉÐ ÑÄÒÁ ÐÅÒ×ÙÍ ÐÁÒÁÍÅÔÒÏÍ ># 13.06.2005 fixed > >echo "Updating kernel-image with all installed modules..." > ># ôÉÐ ÑÄÒÁ (ÐÏÌÕÞÁÅÍ ÉÚ ÔÅËÕÝÅÇÏ ÚÁÐÕÝÅÎÎÏÇÏ) >FLAVOUR=`uname -r | cut -d "-" -f2,3` >test -n "$1" && FLAVOUR=$1 > ># Find max version of rpm from std input list >function find_max() >{ > read M && \ > while read R; do > test -z $R && continue > res=`rpmvercmp $M $R` > test $res -eq -1 && M=$R > done > echo $M >} > ># Set SUDO for user >test $UID -eq 0 || SUDO=sudo >INSTALL="$SUDO apt-get install -y" > >echo "Try to install newest kernel image '$FLAVOUR' type" >NEWESTKERNEL=`$INSTALL kernel-image-$FLAVOUR | grep "\#" | grep -v "\["` >#echo $NEWKERNEL >NEWESTKERNEL=`echo $NEWESTKERNEL | cut -d " " -f 1 | find_max` >if [ -n "$NEWESTKERNEL" ] ; then > echo "Install new kernel $NEWESTKERNEL" > $INSTALL $NEWESTKERNEL >fi > >echo "Check for newest installed kernel..." >NEWESTKERNEL=`rpm -qa kernel-image-${FLAVOUR}* | find_max` >INSTVER=`rpm -q $NEWESTKERNEL --queryformat "%{VERSION}-$FLAVOUR-%{RELEASE}"` > >echo "Updating modules for kernel: $INSTVER ..." >ALLMODULES=`rpm -qa "kernel-modules*$FLAVOUR*" | sed -e "s/-$FLAVOUR.*$//g" | sort -u` > >for i in $ALLMODULES; do echo $i-$INSTVER ; done | xargs $INSTALL
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 7202
: 952