--- update_kernel_modules_cetus.sh.orig 2010-09-26 15:15:55.000000000 +0300 +++ update_kernel_modules_cetus.sh.orig 2010-09-26 15:43:33.000000000 +0300 @@ -29,6 +29,7 @@ Usage: $PROG [options] Valid options are: -f, --force force kernel upgrade + -a, --all install all kernel modules -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,13 +38,15 @@ } #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,f,t:,r:,h -l all,force,type:,release:,help -- "$@"` || show_help eval set -- "$TEMP" while :; do case "$1" in --) shift; break ;; + -a|--all) all=1 + ;; -f|--force) force=1 ;; -t|--type) shift ; kernel_flavour="$1" @@ -134,6 +137,11 @@ 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" + else + if [ $all == 1 ]; then + message "$module_pkgname is not istalled, trying to install..." + $SUDO apt-get install -y "$module_pkgname-$newkernel_ver_flav_rel" + fi fi done