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
a4e51344
Commit
a4e51344
authored
Apr 17, 2018
by
Igor Pecovnik
Browse files
Add warning before changing to alternative kernels
parent
73aaae53
Changes
2
Show whitespace changes
Inline
Side-by-side
debian-config-functions
100644 → 100755
View file @
a4e51344
...
@@ -80,7 +80,7 @@ function beta_disclaimer ()
...
@@ -80,7 +80,7 @@ function beta_disclaimer ()
{
{
exec
3>&1
exec
3>&1
ACKNOWLEDGEMENT
=
$(
dialog
--nocancel
--backtitle
"
$BACKTITLE
"
--no-collapse
--title
" Warning "
\
ACKNOWLEDGEMENT
=
$(
dialog
--nocancel
--backtitle
"
$BACKTITLE
"
--no-collapse
--title
" Warning "
\
--clear
\-
-radiolist
"
\n
$1
.
\n
\n
"
1
2
56
7
"Yes, I understand"
""
off 2>&1 1>&3
)
--clear
\-
-radiolist
"
\n
$1
\n
\n
"
1
1
56
5
"Yes, I understand"
""
off 2>&1 1>&3
)
exec
3>&-
exec
3>&-
}
}
...
@@ -156,13 +156,17 @@ function aval_kernel ()
...
@@ -156,13 +156,17 @@ function aval_kernel ()
LIST_LENGHT
=
$((${#
LIST
[@]
}
/
2
))
;
LIST_LENGHT
=
$((${#
LIST
[@]
}
/
2
))
;
if
[
"
$LIST_LENGHT
"
-eq
1
]
;
then
if
[
"
$LIST_LENGHT
"
-eq
1
]
;
then
TARGET_BRANCH
=
${
AVAL_KERNEL
[0]
}
TARGET_BRANCH
=
${
AVAL_KERNEL
[0]
}
dialog
--backtitle
"
$BACKTITLE
"
--title
" Info "
--msgbox
"
\n
No alternative kernels available!"
7 38
else
else
beta_disclaimer
"Switching between kernels might change functionality of your board or it might fail to boot."
if
[[
-n
$ACKNOWLEDGEMENT
]]
;
then
exec
3>&1
exec
3>&1
TARGET_BRANCH
=
$(
dialog
--cancel-label
"Cancel"
--backtitle
"
$BACKTITLE
"
--no-collapse
\
TARGET_BRANCH
=
$(
dialog
--cancel-label
"Cancel"
--backtitle
"
$BACKTITLE
"
--no-collapse
\
--title
"Upgrade from
$BRANCH
to:"
--clear
--menu
""
$((
6
+
${
LIST_LENGHT
}))
40 15
"
${
LIST
[@]
}
"
2>&1 1>&3
)
--title
"Upgrade from
$BRANCH
to:"
--clear
--menu
""
$((
6
+
${
LIST_LENGHT
}))
40 15
"
${
LIST
[@]
}
"
2>&1 1>&3
)
exitstatus
=
$?
;
exitstatus
=
$?
;
exec
3>&-
exec
3>&-
fi
fi
fi
}
}
...
...
debian-config-jobs
100644 → 100755
View file @
a4e51344
...
@@ -1162,8 +1162,6 @@ function jobs ()
...
@@ -1162,8 +1162,6 @@ function jobs ()
exitstatus
=
$?
;
exitstatus
=
$?
;
[[
$exitstatus
=
0
]]
&&
reboot
[[
$exitstatus
=
0
]]
&&
reboot
fi
fi
else
dialog
--backtitle
"
$BACKTITLE
"
--title
" Info "
--msgbox
"
\n
No alternative kernels available!"
7 38
fi
fi
fi
fi
;;
;;
...
...
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