Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
5d916c1c
Commit
5d916c1c
authored
Aug 19, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit packed 3.26.1
parent
33d97d34
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
12 deletions
+32
-12
epm.sh
packed/epm.sh
+0
-0
serv.sh
packed/serv.sh
+32
-12
No files found.
packed/epm.sh
View file @
5d916c1c
This diff is collapsed.
Click to expand it.
packed/serv.sh
View file @
5d916c1c
...
...
@@ -153,7 +153,7 @@ docmd_foreach()
#showcmd "$@"
shift
for
pkg
in
"
$@
"
;
do
docmd
"
$cmd
"
$pkg
docmd
$cmd
$pkg
done
}
...
...
@@ -1575,14 +1575,25 @@ normalize_name()
esac
}
normalize_version
()
# 1.2.3.4.5 -> 1
normalize_version1
()
{
# hack 7.9 -> 7, 20.04 -> 20.04
# TODO: 2.12.123 -> 2.12
# TODO: 7.10 -> 7 for RHEL Family
echo
"
$1
"
|
sed
-e
"s/
\.
[0-9]
$/
/g"
echo
"
$1
"
|
sed
-e
"s|
\.
.*||"
}
# 1.2.3.4.5 -> 1.2
normalize_version2
()
{
echo
"
$1
"
|
sed
-e
"s|^
\(
[^.][^.]*
\.
[^.][^.]*
\)\.
.*|
\1
|"
}
# 1.2.3.4.5 -> 1.2.3
normalize_version3
()
{
echo
"
$1
"
|
sed
-e
"s|^
\(
[^.][^.]*
\.
[^.][^.]*
\.
[^.][^.]*
\)\.
.*|
\1
|"
}
fill_distr_info
()
{
# Default values
...
...
@@ -1597,28 +1608,30 @@ if distro os-release ; then
# shellcheck disable=SC1090
.
$DISTROFILE
DISTRIB_ID
=
"
$(
normalize_name
"
$NAME
"
)
"
# DISTRIB_ID="$(firstupper "$ID")
"
DISTRIB_RELEASE_ORIG
=
"
$VERSION_ID
"
DISTRIB_RELEASE
=
"
$VERSION_ID
"
[
-n
"
$DISTRIB_RELEASE
"
]
||
DISTRIB_RELEASE
=
"CUR"
# set by os-release:
#PRETTY_NAME
VENDOR_ID
=
"
$ID
"
DISTRIB_FULL_RELEASE
=
$DISTRIB_RELEASE
DISTRIB_RELEASE
=
$(
normalize_version
"
$DISTRIB_RELEASE
"
)
DISTRIB_CODENAME
=
"
$VERSION_CODENAME
"
elif
distro lsb-release
;
then
DISTRIB_ID
=
$(
cat
$DISTROFILE
| get_var DISTRIB_ID
)
DISTRIB_RELEASE
=
$(
cat
$DISTROFILE
| get_var DISTRIB_RELEASE
)
DISTRIB_RELEASE_ORIG
=
"
$DISTRIB_RELEASE
"
DISTRIB_CODENAME
=
$(
cat
$DISTROFILE
| get_var DISTRIB_CODENAME
)
PRETTY_NAME
=
$(
cat
$DISTROFILE
| get_var DISTRIB_DESCRIPTION
)
fi
DISTRIB_RELEASE
=
$(
normalize_version2
"
$DISTRIB_RELEASE
"
)
case
"
$VENDOR_ID
"
in
"alt"
|
"altlinux"
)
# 2.4.5.99 -> 2
DISTRIB_RELEASE
=
$(
echo
"
$DISTRIB_RELEASE
"
|
sed
-e
"s/
\.
[0-9].*//g
"
)
DISTRIB_RELEASE
=
$(
normalize_version1
"
$DISTRIB_RELEASE_ORIG
"
)
case
"
$DISTRIB_ID
"
in
"ALTServer"
|
"ALTSPWorkstation"
|
"Sisyphus"
)
;;
...
...
@@ -1628,7 +1641,8 @@ case "$VENDOR_ID" in
esac
;;
"astra"
)
[
"
$DISTRIB_RELEASE
"
=
"1.17"
]
&&
DISTRIB_RELEASE
=
"
$VERSION_ID
"
DISTRIB_RELEASE
=
$(
normalize_version3
"
$DISTRIB_RELEASE_ORIG
"
|
sed
-e
's|_.*||'
)
#[ "$DISTRIB_RELEASE" = "1.17" ] && DISTRIB_RELEASE="$VERSION_ID"
#DISTRIB_RELEASE="$VERSION_CODENAME"
;;
esac
...
...
@@ -1649,8 +1663,14 @@ case "$DISTRIB_ID" in
case
"
$DISTRIB_FULL_RELEASE
"
in
8.0|8.1
)
;;
8.2|8.3
)
DISTRIB_RELEASE
=
"c9f1"
;;
8.4
)
DISTRIB_RELEASE
=
"c9f2"
;;
8.
*
)
DISTRIB_RELEASE
=
"c9"
DISTRIB_RELEASE
=
"c9
f3
"
;;
esac
# DISTRIB_RELEASE=$(echo $DISTRIB_RELEASE | sed -e "s/\..*//g")
...
...
@@ -2301,7 +2321,7 @@ print_version()
local
on_text
=
"(host system)"
local
virt
=
"
$(
$DISTRVENDOR
-i
)
"
[
"
$virt
"
=
"(unknown)"
]
||
[
"
$virt
"
=
"(host system)"
]
||
on_text
=
"(under
$virt
)"
echo
"Service manager version 3.26.
0
https://wiki.etersoft.ru/Epm"
echo
"Service manager version 3.26.
1
https://wiki.etersoft.ru/Epm"
echo
"Running on
$(
$DISTRVENDOR
-e
)
$on_text
with
$SERVICETYPE
"
echo
"Copyright (c) Etersoft 2012-2021"
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
...
...
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