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
bb49886f
Commit
bb49886f
authored
Mar 05, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement regexp support in source.table and use it
parent
4ca50bc1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
20 deletions
+22
-20
functions.sh
etercifs/functions.sh
+1
-16
source.sh
etercifs/source.sh
+12
-2
source.table
etercifs/source.table
+9
-2
No files found.
etercifs/functions.sh
View file @
bb49886f
...
...
@@ -36,19 +36,6 @@ extract_source()
tar
-xJf
$ETERCIFS_SOURCES_TARBALL
-C
"
$2
"
--strip
1
"
$1
"
}
# TODO: drop it too
check_for_openvz
()
{
if
echo
"
$KERNELVERSION
"
| egrep
-q
"2
\.
6
\.
18.*(stab|ovz-el|ovz-rhel)"
;
then
KERNEL_STRING
=
"centos-ovz"
elif
echo
"
$KERNELVERSION
"
| egrep
-q
"2
\.
6
\.
32.*(stab|ovz-el|ovz-smp|ovz-rhel|openvz)"
;
then
KERNEL_STRING
=
"centos60"
else
return
1
fi
return
0
}
# kernel version sorting
sort_dn
()
{
...
...
@@ -66,9 +53,7 @@ fake_source_versions()
detect_etercifs_sources
()
{
KERNEL_STRING
=
if
check_for_openvz
;
then
echo
"Building from legacy sources for OpenVZ kernel
$KERNEL_STRING
"
elif
which lsb_release
>
/dev/null
;
then
if
which lsb_release
>
/dev/null
;
then
# TODO epm
DISTRO
=
$(
lsb_release
-d
)
KERNEL_STRING
=
$(
./source.sh
"
$DISTRO
"
"
$KERNELVERSION
"
< source.table
)
...
...
etercifs/source.sh
View file @
bb49886f
...
...
@@ -39,8 +39,18 @@ while read vers source other; do
fi
[
-n
"
$VERBOSE
"
]
&&
echo
"
$vers
-
$prevvers
:
$source
"
# FIXME: comparing for kernel version
# >=
# vers is regular expression
if
echo
"
$vers
"
|
grep
-q
"
\*
"
;
then
if
echo
"
$KERNELVERSION
"
| egrep
-q
"
$vers
"
;
then
echo
"
$source
"
exit
fi
# do not count regexps
# prevvers="$vers"
continue
fi
# vers is a kernel version
if
[
-z
"
$skip
"
]
&&
!
verlt
"
$KERNELVERSION
"
"
$vers
"
;
then
if
[
-z
"
$prevvers
"
]
||
verlt
"
$KERNELVERSION
"
"
$prevvers
"
;
then
[
-n
"
$source
"
]
&&
echo
"
$source
"
||
echo
"
$vers
"
...
...
etercifs/source.table
View file @
bb49886f
# TODO: parse with script?
# using version between current and prev
# Using:
# [Distro name]
# real_version source_version
# 1. using version between current and prev
# 2. using first regexp
[.*]
2\.6\.18.*(stab|ovz-el|ovz-rhel) centos-ovz
2\.6\.32.*(stab|ovz-el|ovz-smp|ovz-rhel|openvz) centos60
[GosLinux|CentOS|Red Hat|Scientific Linux|NauLinux|LinuxWizard Server|RERemix]
# >= source_version
...
...
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