ALT Linux Bugzilla
– Attachment 4561 Details for
Bug 22271
[FR] ключик для установки всех модулей
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Добавлены ключи -a (-all), -i
update-kernel-all_modules.patch (text/plain), 2.43 KB, created by
Kulik Dmitriy
on 2010-09-26 17:41:22 MSD
(
hide
)
Description:
Добавлены ключи -a (-all), -i
Filename:
MIME Type:
Creator:
Kulik Dmitriy
Created:
2010-09-26 17:41:22 MSD
Size:
2.43 KB
patch
obsolete
>--- update_kernel_modules_cetus.sh.orig 2010-09-26 15:15:55.000000000 +0300 >+++ update_kernel_modules_cetus.sh 2010-09-26 16:36:28.000000000 +0300 >@@ -28,7 +28,9 @@ > cat <<EOF > Usage: $PROG [options] > Valid options are: >- -f, --force force kernel upgrade >+ -a, --all install all kernel modules >+ -i interactive modules install, exclude force install >+ -f, --force force kernel upgrade, non-interactively > -t, --type install kernel with specified flavour (ovz-smp, std-def, etc) > -r, --release install kernel with specified release (alt10, alt22, etc) > -h, --help show this text and exit >@@ -37,14 +39,18 @@ > } > > #parse command line options >-TEMP=`getopt -n $PROG -o f,t:,r:,h -l force,type:,release:,help -- "$@"` || show_help >+TEMP=`getopt -n $PROG -o a,i,f,t:,r:,h -l all,force,type:,release:,help -- "$@"` || show_help > eval set -- "$TEMP" > > while :; do > case "$1" in > --) shift; break > ;; >- -f|--force) force=1 >+ -a|--all) all=1 >+ ;; >+ -i) interactive=1 ; force=0 >+ ;; >+ -f|--force) force=1 ; interactive=0 > ;; > -t|--type) shift ; kernel_flavour="$1" > ;; >@@ -129,11 +135,34 @@ > # get list of all available modules > ALLMODULES="$(apt-cache pkgnames kernel-modules | grep $kernel_flavour | sed -e "s,^kernel-modules-\(.*\)-$kernel_flavour.*,\1,g"| sed -e "s,-[[:digit:]]\.[[:digit:]]\.[[:digit:]].*,,g" | sort -u)" > >+function module_install() { >+ module=$1 >+# interactive=$2 >+ if [ "$interactive" == 1 ]; then >+ echo -n "Try to install or update module $module [y]/n? " >+ read >+ case "$REPLY" in >+ n|no|N|No|NO|0) return 0 >+ ;; >+ *) >+ ;; >+ esac >+ fi >+ $SUDO apt-get install -y "$module" >+} >+ > for module in $ALLMODULES; do > module_pkgname=kernel-modules-$module > if rpm -q $module_pkgname-"$modules_kernel_flavour" &>/dev/null; then > message "$module_pkgname is installed, trying to update..." >- $SUDO apt-get install -y "$module_pkgname-$newkernel_ver_flav_rel" >+ module_install "$module_pkgname-$newkernel_ver_flav_rel" $interactive >+# $SUDO apt-get install -y "$module_pkgname-$newkernel_ver_flav_rel" >+ else >+ if [ $all == 1 ]; then >+ message "$module_pkgname is not istalled, trying to install..." >+ module_install "$module_pkgname-$newkernel_ver_flav_rel" $interactive >+# $SUDO apt-get install -y "$module_pkgname-$newkernel_ver_flav_rel" >+ fi > fi > done >
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 22271
:
4560
| 4561