Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dadigang
Ventoy
Commits
ff3ce4da
Unverified
Commit
ff3ce4da
authored
Sep 12, 2022
by
Henrique
Committed by
GitHub
Sep 12, 2022
Browse files
Fix Issue #1825 (#1826)
the modifications verify user privilege and prevent improper script execution.
parent
81d3492a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
INSTALL/CreatePersistentImg.sh
INSTALL/CreatePersistentImg.sh
+12
-0
No files found.
INSTALL/CreatePersistentImg.sh
View file @
ff3ce4da
...
@@ -18,6 +18,18 @@ print_usage() {
...
@@ -18,6 +18,18 @@ print_usage() {
echo
''
echo
''
}
}
print_err
()
{
echo
""
echo
"
$*
"
echo
""
}
uid
=
$(
id
-u
)
if
[
$uid
-ne
0
]
;
then
print_err
"Please use sudo or run the script as root."
exit
1
fi
while
[
-n
"
$1
"
]
;
do
while
[
-n
"
$1
"
]
;
do
if
[
"
$1
"
=
"-s"
]
;
then
if
[
"
$1
"
=
"-s"
]
;
then
shift
shift
...
...
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