Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
b1fb79b5
Commit
b1fb79b5
authored
Jun 19, 2020
by
Igor Pecovnik
Browse files
Fixes kernel switching
parent
84334e86
Changes
1
Hide whitespace changes
Inline
Side-by-side
debian-config-functions
View file @
b1fb79b5
...
@@ -462,6 +462,8 @@ function other_kernel_version ()
...
@@ -462,6 +462,8 @@ function other_kernel_version ()
new_list+
=(
"
${
LIST
[
$prvi
]
}
=
${
LIST
[
$drugi
]
}
"
)
new_list+
=(
"
${
LIST
[
$prvi
]
}
=
${
LIST
[
$drugi
]
}
"
)
new_list+
=(
${
LIST
[
$tretji
]
}
)
new_list+
=(
${
LIST
[
$tretji
]
}
)
fi
fi
local
tmp
=
"
${
LIST
[
$prvi
]
}
=
${
LIST
[
$drugi
]
}${
LIST
[
$tretji
]
}
"
[[
${#
tmp
}
-gt
$chrlen
]]
&&
local
chrlen
=
${#
tmp
}
done
done
# copy back to main array
# copy back to main array
...
@@ -475,9 +477,8 @@ function other_kernel_version ()
...
@@ -475,9 +477,8 @@ function other_kernel_version ()
\n\n\Z
1In case of troubles expect no help!
\Z
0"
\n\n\Z
1In case of troubles expect no help!
\Z
0"
if
[[
-n
$ACKNOWLEDGEMENT
]]
;
then
if
[[
-n
$ACKNOWLEDGEMENT
]]
;
then
exec
3>&1
exec
3>&1
TARGET_VERSION
=
$(
dialog
--cancel-label
"Cancel"
--backtitle
"
$BACKTITLE
"
--no-collapse
\
TARGET_VERSION
=
$(
dialog
--ok-label
"Reboot"
--cancel-label
"Cancel"
--backtitle
"
$BACKTITLE
"
--no-collapse
\
--title
"Switch from and reboot"
--clear
--menu
"
\n
${
CURRENT_VERSION
}
$(
uname
-r
)
\n
\n
"
\
--title
"Select kernel and reboot"
--clear
--menu
""
$((
6
+
${
LIST_LENGTH
}))
$((
7
+
${
chrlen
}))
25
"
${
LIST
[@]
}
"
2>&1 1>&3
)
$((
9
+
${
LIST_LENGTH
}))
62 25
"
${
LIST
[@]
}
"
2>&1 1>&3
)
exitstatus
=
$?
;
exitstatus
=
$?
;
exec
3>&-
exec
3>&-
if
[[
$exitstatus
=
0
]]
;
then
if
[[
$exitstatus
=
0
]]
;
then
...
@@ -497,8 +498,11 @@ function other_kernel_version ()
...
@@ -497,8 +498,11 @@ function other_kernel_version ()
TARGET_VERSION_PRE
=
$(
echo
$TARGET_VERSION_DTB
|
cut
-f1
-d
"="
)
TARGET_VERSION_PRE
=
$(
echo
$TARGET_VERSION_DTB
|
cut
-f1
-d
"="
)
TARGET_VERSION_SUB
=
$(
echo
$TARGET_VERSION_DTB
|
cut
-f2
-d
"="
)
TARGET_VERSION_SUB
=
$(
echo
$TARGET_VERSION_DTB
|
cut
-f2
-d
"="
)
[[
-n
$(
apt-cache madison
"
$TARGET_VERSION_PRE
"
|
grep
$TARGET_VERSION_SUB
)
]]
&&
\
[[
-n
$(
apt-cache madison
"
$TARGET_VERSION_PRE
"
|
grep
$TARGET_VERSION_SUB
)
]]
&&
\
# installs u-boot only if exits
apt-cache show linux-u-boot-
${
BOARD
}
-
${
UPGRADE_UBOOT
}
2> /dev/null
[[
$?
-eq
0
]]
&&
PACKAGE_LIST
=
$PACKAGE_LIST
" linux-u-boot-
${
BOARD
}
-
${
UPGRADE_UBOOT
}
"
PACKAGE_LIST
=
$PACKAGE_LIST
"
$TARGET_VERSION_DTB
linux-u-boot-
${
BOARD
}
-
${
UPGRADE_UBOOT
}
"
PACKAGE_LIST
=
$PACKAGE_LIST
"
$TARGET_VERSION_DTB
"
echo
$PACKAGE_LIST
>
/tmp/switch_kernel.log 2>&1
echo
$PACKAGE_LIST
>
/tmp/switch_kernel.log 2>&1
debconf-apt-progress
--
apt
--download-only
--allow-downgrades
-y
--no-install-recommends
install
$PACKAGE_LIST
debconf-apt-progress
--
apt
--download-only
--allow-downgrades
-y
--no-install-recommends
install
$PACKAGE_LIST
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment