update-kernel: Add undocumented '--reinstall' option
This will pass `--reinstall' to `apt-get install'. Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
This commit is contained in:
parent
390e0d427a
commit
4fab0940fa
@ -89,7 +89,7 @@ ufver() {
|
||||
}
|
||||
|
||||
#parse command line options
|
||||
TEMP=$(getopt -n "$PROG" -o a,i,l,f,y,t:,r:,v,n,h -l interactive,list,all,force,type:,release:,verbose,dry-run,help -- "$@") || show_help
|
||||
TEMP=$(getopt -n "$PROG" -o a,i,l,f,y,t:,r:,v,n,h -l interactive,list,all,force,type:,release:,verbose,reinstall,dry-run,help -- "$@") || show_help
|
||||
eval set -- "$TEMP"
|
||||
|
||||
while :; do
|
||||
@ -110,6 +110,8 @@ while :; do
|
||||
;;
|
||||
-v|--verbose) verbose=1
|
||||
;;
|
||||
--reinstall) reinstall=$1
|
||||
;;
|
||||
-n|--dry-run) dryrun="--download-only"
|
||||
;;
|
||||
-h|--help) show_help
|
||||
@ -476,7 +478,7 @@ fi
|
||||
|
||||
# now install everything at once
|
||||
# shellcheck disable=SC2086
|
||||
V apt-get install -o APT::Install::Virtual=true -y $dryrun "kernel-image-$kernel_flavour#$kmaxver" $modules_to_install \
|
||||
V apt-get install -o APT::Install::Virtual=true -y $reinstall $dryrun "kernel-image-$kernel_flavour#$kmaxver" $modules_to_install \
|
||||
|| fatal "failed to install kernel-image-$kernel_flavour-$kmaxver with modules"
|
||||
|
||||
# proper reboot will sync, but make sure it's synced in case user press reset button
|
||||
|
Loading…
Reference in New Issue
Block a user