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
Show 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 @@
echo
"====================================================================="
echo
"Check build etercifs module for all found kernels"
BUILTLIST
=
for
LM
in
`
ls
/lib/modules
`
;
do
KERNSRC
=
`
readlink
/lib/modules/
$LM
/build
`
if
[
$KERNSRC
]
;
then
[
-L
$KERNSRC
]
&&
continue
[
-f
$KERNSRC
/.config
]
||
continue
for
KERNSRC
in
$(
list_kernel_headers
)
;
do
echo
"---------------------------------------------------------------------"
detect_kernel
if
[
-z
"
$KERNELVERSION
"
]
;
then
...
...
etercifs/functions.sh
View file @
cc8bd06c
...
...
@@ -248,6 +248,17 @@ create_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
detect_kernel
()
{
...
...
@@ -296,14 +307,16 @@ check_headers()
# TODO: use distr_vendor
# TODO: use eepm, try install
cat
>
&2
<<
EOF
Error: no kernel headers found at
$KERNSRC
Please install package
Error: no kernel headers found at
$KERNSRC
, there are follow:
$(
list_kernel_headers
)
Please install follow package for the current kernel:
kernel-headers-modules-XXXX for ALT Linux
kernel-devel for RHEL / CentOS / Fedora
linux-headers-XXXX for Debian / Ubuntu
kernel-source-XXXX for SUSE Linux
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
)
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
...
...
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