From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00, DNS_FROM_OPENWHOIS,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.5 To: ALT Devel discussion list Organization: Tyumen State University References: <20100927100957.48A9F21848F4@ssh.git.altlinux.org> From: "Vladimir V. Kamarzin" Date: Mon, 27 Sep 2010 16:52:13 +0600 In-Reply-To: <20100927100957.48A9F21848F4@ssh.git.altlinux.org> (Dmitriy Kulik's message of "Mon, 27 Sep 2010 14:09:57 +0400 (MSD)") Message-ID: User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.5-b29 (linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-5 Content-Transfer-Encoding: quoted-printable Subject: Re: [devel] [SCM] packages/update-kernel: heads/master X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2010 10:52:21 -0000 Archived-At: List-Archive: List-Post: >>>>> On 27 Sep 2010 at 16:09 "DK" =3D=3D Dmitriy Kulik writes: DK> Update of /people/lnkvisitor/packages/update-kernel.git DK> Changes statistics since `0.9.2-alt1' follows: DK> update-kernel.spec | 6 +++++- DK> update_kernel_modules_cetus.sh | 37 ++++++++++++++++++++++++++++++++= +---- DK> 2 files changed, 38 insertions(+), 5 deletions(-) DK> Changelog since `0.9.2-alt1' follows: DK> commit a372000db6555c92ce04c0d2003d6055436dd609 DK> Author: Dmitriy Kulik DK> Date: Mon Sep 27 13:05:24 2010 +0300 DK> 0.9.3-alt1 =20=20=20=20 DK> - Add interactive mode (-i) DK> - Add options -a|--all (Closes: #22271) DK> Full diff since `0.9.2-alt1' follows: DK> diff --git a/update-kernel.spec b/update-kernel.spec DK> index 11e8619..3dd79d1 100644 DK> --- a/update-kernel.spec DK> +++ b/update-kernel.spec DK> @@ -1,5 +1,5 @@ DK> Name: update-kernel DK> -Version: 0.9.2 DK> +Version: 0.9.3 DK> Release: alt1 =20 DK> Summary: Update kernel and modules DK> @@ -37,6 +37,10 @@ install -pm755 remove-old-kernels %buildroot%_sbindi= r/ DK> %_sbindir/* =20 DK> %changelog DK> +* Mon Sep 27 2010 Dmitriy Kulik 0.9.3-alt1 DK> +- Add interactive mode (-i) DK> +- Add options -a|--all (Closes: #22271) DK> + DK> * Sat Oct 17 2009 Michael Shigorin 0.9.2-alt1 DK> - removed warning on x11setupdrv absence due to its obsolescence DK> (closes: #21872) =BF=DE=D2=EB=E8=D5=DD=D8=D5 =D2=D5=E0=E1=D8=D8 =D2 =E1=DF=D5=DA=D5 =DB=E3= =E7=E8=D5 =D4=D5=DB=D0=E2=EC =DE=E2=D4=D5=DB=EC=DD=EB=DC =DA=DE=DC=DC=D8=E2= =DE=DC. DK> diff --git a/update_kernel_modules_cetus.sh b/update_kernel_modules_cet= us.sh DK> index 86af74c..0653454 100755 DK> --- a/update_kernel_modules_cetus.sh DK> +++ b/update_kernel_modules_cetus.sh DK> @@ -4,6 +4,7 @@ DK> # Copyright (C) 2008-2009 Vladimir V. Kamarzin DK> # Copyright (C) 2008-2009 Michael Shigorin DK> # Copyright (C) 2008 Konstantin Baev DK> +# Copyright (C) 2010 Dmitry Kulik DK> # DK> # Update kernel with modules DK> # DK> @@ -28,7 +29,9 @@ show_help() DK> cat < Usage: $PROG [options] DK> Valid options are: DK> - -f, --force force kernel upgrade DK> + -a, --all install all kernel modules DK> + -i interactive modules install, exclude force install =B0 =D3=D4=D5 =D4=DB=D8=DD=DD=D0=EF =E4=DE=E0=DC=D0? DK> + -f, --force force kernel upgrade, non-interactively DK> -t, --type install kernel with specified flavour (ovz-smp, std-def, e= tc) DK> -r, --release install kernel with specified release (alt10, alt22, et= c) DK> -h, --help show this text and exit DK> @@ -37,14 +40,18 @@ exit 1 DK> } =20 DK> #parse command line options DK> -TEMP=3D`getopt -n $PROG -o f,t:,r:,h -l force,type:,release:,help -- "= $@"` || show_help DK> +TEMP=3D`getopt -n $PROG -o a,i,f,t:,r:,h -l all,force,type:,release:,h= elp -- "$@"` || show_help DK> eval set -- "$TEMP" =20 DK> while :; do DK> case "$1" in DK> --) shift; break DK> ;; DK> - -f|--force) force=3D1 DK> + -a|--all) all=3D1 DK> + ;; ";;" =E1=EA=D5=E5=D0=DB=DE DK> + -i) interactive=3D1 ; force=3D0 DK> + ;; DK> + -f|--force) force=3D1 ; interactive=3D0 =C2=D0=DA =DB=E3=E7=E8=D5 =DD=D5 =D4=D5=DB=D0=E2=EC. =BD=D0=D4=DE =DF=E0=DE= =E1=E2=DE =E1=D4=D5=DB=D0=E2=EC =DF=E0=DE=D2=D5=E0=DA=E3 =DD=D0 =D2=D7=D0= =D8=DC=DE=D8=E1=DA=DB=EE=E7=D0=EE=E9=D8=D5 =DE=DF=E6=D8=D8 (=DF=E0=D8=DC=D5=E0=EB =DC=DE=D6=DD=DE =DF=DE=E1=DC=DE=E2=E0=D5=E2=EC =D2 g= ear, hasher, sisyphus-mirror - =DA=DB=EE=E7=D5=D2=D0=EF =E4=E0=D0=D7=D0 "ar= e mutually exclusive") DK> ;; DK> -t|--type) shift ; kernel_flavour=3D"$1" DK> ;; DK> @@ -129,11 +136,33 @@ message "Updating modules for kernel: $newkernel_= ver_flav_rel" DK> # get list of all available modules DK> ALLMODULES=3D"$(apt-cache pkgnames kernel-modules | grep $kernel_flavo= ur | sed -e "s,^kernel-modules-\(.*\)-$kernel_flavour.*,\1,g"| sed -e "s,-[= [:digit:]]\.[[:digit:]]\.[[:digit:]].*,,g" | sort -u)" =20 DK> +function module_install() { =C1=DB=DE=D2=DE function =DC=DE=D6=DD=DE =E3=D1=E0=D0=E2=EC. DK> + module=3D$1 DK> + if [ "$interactive" =3D=3D 1 ]; then "=3D=3D" =DC=DE=D6=DD=DE =D7=D0=DC=D5=DD=D8=E2=EC =DD=D0 "=3D" --=20 vvk