View | Details | Raw Unified | Return to bug 20069
Collapse All | Expand All

(-)update-kernel.orig (-4 / +6 lines)
Lines 91-100 kmaxver="" Link Here
91
while read package_name
91
while read package_name
92
do
92
do
93
	[ `rpmvercmp "$kmaxver" "$package_name"` -lt 0 ] && kmaxver="$package_name" ||:
93
	[ `rpmvercmp "$kmaxver" "$package_name"` -lt 0 ] && kmaxver="$package_name" ||:
94
done < <(echo "$KERNEL_PKGS" | grep "$pgkgrep")
94
done < <(echo "$KERNEL_PKGS" | grep "$pgkgrep" | sed -e "s/.*://g" | sed -e "s/.*#//g")
95
96
KERNELTOINSTALL=$(echo "$KERNEL_PKGS" | grep "$pgkgrep" |  grep "$kmaxver")
95
97
96
# ask user
98
# ask user
97
echo "Try to install new kernel $kmaxver and update its modules? [y]/n"
99
echo "Try to install new kernel $KERNELTOINSTALL and update its modules? [y]/n"
98
[ "$force" = 1 ] && echo "yes" || {
100
[ "$force" = 1 ] && echo "yes" || {
99
read
101
read
100
case "$REPLY" in
102
case "$REPLY" in
Lines 113-122 rpm -q kernel-image-"$kernel_type" &>/de Link Here
113
# use sudo(1) if running as unprivileged user
115
# use sudo(1) if running as unprivileged user
114
[ "$UID" = "0" ] && SUDO= || SUDO=sudo
116
[ "$UID" = "0" ] && SUDO= || SUDO=sudo
115
117
116
$SUDO apt-get install -y "$kmaxver"
118
$SUDO apt-get install -y "$KERNELTOINSTALL"
117
119
118
# newest kernel package name
120
# newest kernel package name
119
NEWESTKERNEL=`echo "$kmaxver" | sed -e "s/#/-/g"`
121
NEWESTKERNEL=`echo "$KERNELTOINSTALL" | sed -e "s/#.*:/-/g" | sed -e "s/#/-/g"`
120
122
121
# Выбор и доустановка модулей. При смене версии ядра состав
123
# Выбор и доустановка модулей. При смене версии ядра состав
122
# модулей может измениться. Раньше это приводило к завершению
124
# модулей может измениться. Раньше это приводило к завершению

Return to bug 20069