Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
Meta MAR Fast Boot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Qiyang Sun
Meta MAR Fast Boot
Commits
b53cc98d
Verified
Commit
b53cc98d
authored
8 months ago
by
Qiyang Sun
Browse files
Options
Downloads
Patches
Plain Diff
Fastinit trigger kernel panic if argument invalid
parent
499d4e1d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
recipes-core/fastinit/files/fastinit.sh
+8
-2
8 additions, 2 deletions
recipes-core/fastinit/files/fastinit.sh
with
8 additions
and
2 deletions
recipes-core/fastinit/files/fastinit.sh
+
8
−
2
View file @
b53cc98d
...
...
@@ -77,9 +77,12 @@ level_six() {
runlevel
=
$1
if
[
-z
"
$runlevel
"
]
;
then
warn
_to_kernel
"cannot read runlevel from argument"
crit
_to_kernel
"cannot read runlevel from argument"
warn_to_kernel
"please edit cmdline.txt in bootfs"
warn_to_kernel
"usage: init=/usr/sbin/fastinit RUNLEVEL"
crit_to_kernel
"triggering kernel panic (c) using sysrq"
mount
-t
proc proc /proc
echo
c
>
/proc/sysrq-trigger
else
case
$runlevel
in
0
)
...
...
@@ -105,8 +108,11 @@ else
level_six
;;
*
)
warn
_to_kernel
"Runlevel
$runlevel
not implemented"
crit
_to_kernel
"Runlevel
$runlevel
not implemented"
warn_to_kernel
"usage: /usr/sbin/fastinit RUNLEVEL"
crit_to_kernel
"triggering kernel panic (c) using sysrq"
mount
-t
proc proc /proc
echo
c
>
/proc/sysrq-trigger
;;
esac
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment