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
OpenDAS
dcu_env_check
Commits
1ef9e632
Commit
1ef9e632
authored
May 21, 2025
by
liumg
Browse files
fix init_check function
parent
a2ad0545
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
system_check.sh
system_check.sh
+7
-7
No files found.
system_check.sh
View file @
1ef9e632
...
@@ -56,15 +56,15 @@ init_check() {
...
@@ -56,15 +56,15 @@ init_check() {
local
pkgs_debian
=(
dmidecode lshw pciutils numactl-devel
)
local
pkgs_debian
=(
dmidecode lshw pciutils numactl-devel
)
local
pkgs_centos
=(
dmidecode lshw pciutils numactl-dev
)
local
pkgs_centos
=(
dmidecode lshw pciutils numactl-dev
)
local
cmd
=(
dmidecode lshw lspci numactl
)
local
cmd
=(
dmidecode lshw lspci numactl
)
for
((
i
=
0
;
i<
${#
cmd
[@]; i++
}
))
;
do
for
((
i
=
0
;
i<
${#
cmd
[@]
}
;
i++
))
;
do
if
!
command
-v
$cmd
[
i] &>/dev/null
;
then
if
!
command
-v
$
{
cmd
[i]
}
&>/dev/null
;
then
if
command
-v
apt-get &>/dev/null
;
then
if
command
-v
apt-get &>/dev/null
;
then
echo
"没有
$cmd
[i] 命令,请先安装
$pkgs_debian
[i]"
echo
"没有
$
{
cmd
[i]
}
命令,请先安装
$
{
pkgs_debian
[i]
}
"
apt-get
install
-y
pciutils
apt-get
install
-y
${
pkgs_debian
[i]
}
elif
command
-v
yum &>/dev/null
;
then
elif
command
-v
yum &>/dev/null
;
then
echo
"没有
$cmd
[i] 命令,请先安装
$pkgs_centos
[i]"
echo
"没有
$
{
cmd
[i]
}
命令,请先安装
$
{
pkgs_centos
[i]
}
"
yum
install
-y
pciutils
yum
install
-y
${
pkgs_centos
[i]
}
fi
fi
fi
fi
done
done
...
...
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