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
a9eea65f
Commit
a9eea65f
authored
May 07, 2019
by
Igor Pecovnik
Browse files
Improved kernel changing procedure
parent
177ae8c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
debian-config-functions
View file @
a9eea65f
...
@@ -439,7 +439,7 @@ function other_kernel_version ()
...
@@ -439,7 +439,7 @@ function other_kernel_version ()
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
--cancel-label
"Cancel"
--backtitle
"
$BACKTITLE
"
--no-collapse
\
--title
"Switch from"
--clear
--menu
"
\n
${
CURRENT_VERSION
}
$(
uname
-r
)
\n
\n
"
$((
9
+
${
LIST_LENGTH
}))
62 25
"
${
LIST
[@]
}
"
2>&1 1>&3
)
--title
"Switch from
and reboot
"
--clear
--menu
"
\n
${
CURRENT_VERSION
}
$(
uname
-r
)
\n
\n
"
$((
9
+
${
LIST_LENGTH
}))
62 25
"
${
LIST
[@]
}
"
2>&1 1>&3
)
exitstatus
=
$?
;
exitstatus
=
$?
;
exec
3>&-
exec
3>&-
if
[[
$exitstatus
=
0
]]
;
then
if
[[
$exitstatus
=
0
]]
;
then
...
@@ -455,10 +455,18 @@ function other_kernel_version ()
...
@@ -455,10 +455,18 @@ function other_kernel_version ()
if
[[
$?
=
0
]]
;
then
if
[[
$?
=
0
]]
;
then
# remove old kernel
# remove old kernel
dialog
--backtitle
"
$BACKTITLE
"
--title
"Please wait"
--infobox
"
\n
Removing current kernel ..."
5 36
dialog
--backtitle
"
$BACKTITLE
"
--title
"Please wait"
--infobox
"
\n
Removing current kernel ..."
5 36
aptitude remove ~nlinux-image
*${
LINUXFAMILY
}
--quiet
=
100
-y
>>
/var/log/upgrade.log 2>&1
aptitude remove ~nlinux-image-
${
LINUXFAMILY
}
--quiet
=
100
-y
>>
/var/log/upgrade.log 2>&1
aptitude remove ~nlinux-dtb
--quiet
=
100
-y
>>
/var/log/upgrade.log 2>&1
aptitude remove ~nlinux-image-next-
${
LINUXFAMILY
}
--quiet
=
100
-y
>>
/var/log/upgrade.log 2>&1
aptitude remove ~nlinux-image-dev-
${
LINUXFAMILY
}
--quiet
=
100
-y
>>
/var/log/upgrade.log 2>&1
aptitude remove ~nlinux-dtb-
${
LINUXFAMILY
}
--quiet
=
100
-y
>>
/var/log/upgrade.log 2>&1
aptitude remove ~nlinux-dtb-next-
${
LINUXFAMILY
}
--quiet
=
100
-y
>>
/var/log/upgrade.log 2>&1
aptitude remove ~nlinux-dtb-dev-
${
LINUXFAMILY
}
--quiet
=
100
-y
>>
/var/log/upgrade.log 2>&1
# cleanup
find
"/boot/"
-name
"System.map*"
-type
f
-delete
find
"/boot/"
-name
"config*"
-type
f
-delete
find
"/boot/"
-name
"vmlinuz*"
-type
f
-delete
find
"/boot/"
-name
"*nitrd*"
-type
f
-delete
debconf-apt-progress
--
apt-get
-y
-qq
--allow-downgrades
--no-install-recommends
install
$PACKAGE_LIST
debconf-apt-progress
--
apt-get
-y
-qq
--allow-downgrades
--no-install-recommends
install
$PACKAGE_LIST
dialog
--title
"Switching kernel to"
--backtitle
"
$BACKTITLE
"
--yes-label
"Reboot"
--no-label
"Cancel"
--yesno
"
\n
$TARGET_VERSION
?"
7 48
if
[[
$?
=
0
]]
;
then
reboot
;
fi
if
[[
$?
=
0
]]
;
then
reboot
;
fi
else
else
dialog
--backtitle
"
$BACKTITLE
"
--title
"Warning"
--msgbox
"
\n
Test install failed. Can't change firmware
\n\n
Check /tmp/switch_kernel.log"
9 48
dialog
--backtitle
"
$BACKTITLE
"
--title
"Warning"
--msgbox
"
\n
Test install failed. Can't change firmware
\n\n
Check /tmp/switch_kernel.log"
9 48
...
...
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