Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
tails
tails
Commits
3b0d13c9
Commit
3b0d13c9
authored
Jul 17, 2020
by
geb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add defensive quoting and error catch around udevadm info just in case (refs:
#17784
)
parent
e9b86c7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
config/chroot_local-includes/usr/local/lib/tails-shell-library/hardware.sh
...al-includes/usr/local/lib/tails-shell-library/hardware.sh
+3
-3
No files found.
config/chroot_local-includes/usr/local/lib/tails-shell-library/hardware.sh
View file @
3b0d13c9
...
...
@@ -43,9 +43,9 @@ get_module_used_by_nic() {
}
get_name_of_nic
()
{
vendor
=
$(
udevadm info
-x
--query
=
property /sys/class/net/
${
1
}
|
sed
-n
"s/ID_VENDOR_FROM_DATABASE='
\(
.*
\)
'/
\\
1/p"
)
device
=
$(
udevadm info
-x
--query
=
property /sys/class/net/
${
1
}
|
sed
-n
"s/ID_MODEL_FROM_DATABASE='
\(
.*
\)
'/
\\
1/p"
)
echo
"
$vendor
$device
"
vendor
=
$(
udevadm info
-x
--query
=
property /sys/class/net/
${
1
}
|
sed
-n
"s/ID_VENDOR_FROM_DATABASE='
\(
.*
\)
'/
\\
1/p"
||
:
)
device
=
$(
udevadm info
-x
--query
=
property /sys/class/net/
${
1
}
|
sed
-n
"s/ID_MODEL_FROM_DATABASE='
\(
.*
\)
'/
\\
1/p"
||
:
)
echo
"
$
{
vendor
}
$
{
device
}
"
}
# Auxillary function for mod_rev_dep(). It recurses over the graph of
...
...
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