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
3a63d80b
Commit
3a63d80b
authored
Apr 10, 2009
by
Konstantin Baev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add CentOS specific part in building scripts
parent
a50c9f1e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
0 deletions
+55
-0
functions.sh
etercifs/functions.sh
+55
-0
No files found.
etercifs/functions.sh
View file @
3a63d80b
...
...
@@ -36,6 +36,54 @@ detect_etercifs_sources()
[
-n
"
$ETERCIFS_SOURCES_LIST
"
]
||
ETERCIFS_SOURCES_LIST
=
$DATADIR
/sources/kernel-source-etercifs
*
[
-n
"
`
ls
$ETERCIFS_SOURCES_LIST
`
"
]
||
fatal
"Etercifs kernel module sources does not installed!"
KERNEL_SOURCE_ETERCIFS_LINK
=
`
ls
-1
$ETERCIFS_SOURCES_LIST
|
grep
$KERNEL
|
sort
-r
|
head
-n
1
`
# CentOS specific part
grep
'CentOS'
/etc/redhat-release &>/dev/null
if
[
"
$?
"
==
0
]
;
then
echo
echo
"Found CentOS."
kernel_release4
N1
=
`
echo
$KERNEL4
|
cut
-d
"."
-f
1
`
N2
=
`
echo
$KERNEL4
|
cut
-d
"."
-f
2
`
N3
=
`
echo
$KERNEL4
|
cut
-d
"."
-f
3 |
cut
-d
"-"
-f
1
`
N4
=
`
echo
$KERNEL4
|
cut
-d
"-"
-f
2 |
cut
-d
"."
-f
1
`
CENTOS53
=
0
if
[
"
$N1
"
-eq
'2'
]
&&
[
"
$N2
"
-eq
'6'
]
;
then
if
[
"
$N3
"
-eq
18
]
;
then
if
[
"
$N4
"
-eq
128
]
;
then
echo
"Your kernel is 2.6.18-128.x"
CENTOS53
=
1
elif
[
"
$N4
"
-gt
128
]
;
then
echo
"Warning! Your kernel is newer, then 2.6.18-128.x"
CENTOS53
=
1
elif
[
"
$N4
"
-gt
92
]
&&
[
"
$N4
"
-lt
128
]
;
then
echo
"Warning! Your kernel is newer, then 2.6.18-92.x and older, then 2.6.18-128.x"
elif
[
"
$N4
"
-lt
92
]
;
then
echo
"Warning! Your kernel is older, then 2.6.18-92.x"
else
echo
"Your kernel is 2.6.18-92.x"
fi
elif
[
"
$N3
"
-gt
18
]
&&
[
"
$N3
"
-lt
23
]
;
then
echo
"Warning! Your kernel is newer, then 2.6.18 and older, then 2.6.23"
CENTOS53
=
1
else
echo
"Warning! Your kernel is older, then 2.6.18 or newer, then 2.6.22"
fi
else
echo
"Warning! Your kernel in not 2.6.x"
fi
if
[
"
$CENTOS53
"
-eq
1
]
;
then
echo
"Building from sources, adapted for kernels 2.6.18-128.x from CentOS 5.3."
KERNEL_SOURCE_ETERCIFS_LINK
=
`
ls
-1
$ETERCIFS_SOURCES_LIST
|
grep
'centos53'
|
sort
-r
|
head
-n
1
`
else
echo
"Building from legacy sources."
fi
echo
fi
# end of CentOS specific part
[
-f
"
$KERNEL_SOURCE_ETERCIFS_LINK
"
]
||
fatal
"Etercifs kernel module sources for current kernel does not installed!"
KERNEL_SOURCE_ETERCIFS
=
`
readlink
-f
$KERNEL_SOURCE_ETERCIFS_LINK
`
[
"
$KERNEL_SOURCE_ETERCIFS
"
]
||
fatal
"Etercifs kernel module sources for current kernel does not installed!"
...
...
@@ -57,9 +105,16 @@ create_builddir()
kernel_release
()
{
# 2.6.27
KERNEL
=
`
echo
$KERNELVERSION
|
sed
's/\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/'
`
}
kernel_release4
()
{
# 2.6.18-128 or 2.6.29.1
KERNEL4
=
`
echo
$KERNELVERSION
|
sed
's/\([0-9]\+\.[0-9]\+\.[0-9]\+[\.-][0-9]\+\).*/\1/'
`
}
# Heuristic
detect_kernel
()
{
...
...
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