Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etercifs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etercifs
Commits
cc8bd06c
Commit
cc8bd06c
authored
Mar 05, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement list_kernel_headers and use it
parent
cf0c773f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
checkmodule.sh
etercifs/checkmodule.sh
+1
-5
functions.sh
etercifs/functions.sh
+16
-3
No files found.
etercifs/checkmodule.sh
View file @
cc8bd06c
...
@@ -10,11 +10,7 @@
...
@@ -10,11 +10,7 @@
echo
"====================================================================="
echo
"====================================================================="
echo
"Check build etercifs module for all found kernels"
echo
"Check build etercifs module for all found kernels"
BUILTLIST
=
BUILTLIST
=
for
LM
in
`
ls
/lib/modules
`
;
do
for
KERNSRC
in
$(
list_kernel_headers
)
;
do
KERNSRC
=
`
readlink
/lib/modules/
$LM
/build
`
if
[
$KERNSRC
]
;
then
[
-L
$KERNSRC
]
&&
continue
[
-f
$KERNSRC
/.config
]
||
continue
echo
"---------------------------------------------------------------------"
echo
"---------------------------------------------------------------------"
detect_kernel
detect_kernel
if
[
-z
"
$KERNELVERSION
"
]
;
then
if
[
-z
"
$KERNELVERSION
"
]
;
then
...
...
etercifs/functions.sh
View file @
cc8bd06c
...
@@ -248,6 +248,17 @@ create_builddir()
...
@@ -248,6 +248,17 @@ create_builddir()
extract_source
$KERNEL_SOURCE_ETERCIFS
$BUILDDIR
extract_source
$KERNEL_SOURCE_ETERCIFS
$BUILDDIR
}
}
list_kernel_headers
()
{
local
LM
for
LM
in
`
ls
-d
/lib/modules/
*
/build
`
;
do
[
-r
"
$LM
"
]
||
continue
[
-L
$(
readlink
$LM
)
]
&&
continue
[
-f
$LM
/.config
]
||
continue
echo
"
$LM
"
done
}
# Heuristic
# Heuristic
detect_kernel
()
detect_kernel
()
{
{
...
@@ -296,14 +307,16 @@ check_headers()
...
@@ -296,14 +307,16 @@ check_headers()
# TODO: use distr_vendor
# TODO: use distr_vendor
# TODO: use eepm, try install
# TODO: use eepm, try install
cat
>
&2
<<
EOF
cat
>
&2
<<
EOF
Error: no kernel headers found at
$KERNSRC
Error: no kernel headers found at
$KERNSRC
, there are follow:
Please install package
$(
list_kernel_headers
)
Please install follow package for the current kernel:
kernel-headers-modules-XXXX for ALT Linux
kernel-headers-modules-XXXX for ALT Linux
kernel-devel for RHEL / CentOS / Fedora
kernel-devel for RHEL / CentOS / Fedora
linux-headers-XXXX for Debian / Ubuntu
linux-headers-XXXX for Debian / Ubuntu
kernel-source-XXXX for SUSE Linux
kernel-source-XXXX for SUSE Linux
kernel-source-XXXX for Slackware
kernel-source-XXXX for Slackware
dkms-etercifs for Mandriva
dkms-etercifs for
ROSA /
Mandriva
where XXXX is your current version from \
$
uname -r:
$(
uname
-r
)
where XXXX is your current version from \
$
uname -r:
$(
uname
-r
)
or use KERNELVERSION variable to set correct version (for /lib/modules/KERNELVERSION/build)
or use KERNELVERSION variable to set correct version (for /lib/modules/KERNELVERSION/build)
or set KERNSRC and KERNELVERSION variables to set correct kernel headers location
or set KERNSRC and KERNELVERSION variables to set correct kernel headers location
...
...
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