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
Vladislav
eepm
Commits
a14f59c0
Commit
a14f59c0
authored
Aug 15, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Plain Diff
backported to p8 as 1.8.8-alt0.M80P.1 (with rpmbph script)
parents
2d38b639
aaad900a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
16 deletions
+44
-16
epm-install
bin/epm-install
+7
-3
serv
bin/serv
+7
-3
serv-disable
bin/serv-disable
+2
-0
serv-enable
bin/serv-enable
+11
-4
serv-status
bin/serv-status
+10
-4
eepm.spec
eepm.spec
+7
-2
No files found.
bin/epm-install
View file @
a14f59c0
...
...
@@ -18,6 +18,7 @@
#
load_helper epm-query
load_helper epm-assure
load_helper epm-check_updated_repo
# TODO: use when run install with epm --skip-installed install
...
...
@@ -327,13 +328,16 @@ epm_install_files()
apt-rpm
)
__epm_check_if_try_install_deb
$@
&&
return
sudocmd rpm
-Uvh
$force
$nodeps
$@
&&
return
local
RES
=
$?
# do not use low-level for install by file path
if
!
is_dirpath
"
$@
"
||
[
"
$(
get_package_type
"
$@
"
)
"
=
"rpm"
]
;
then
sudocmd rpm
-Uvh
$force
$nodeps
$@
&&
return
local
RES
=
$?
__epm_check_if_rpm_already_installed
$@
&&
return
__epm_check_if_rpm_already_installed
$@
&&
return
# if run with --nodeps, do not fallback on hi level
[
-n
"
$nodeps
"
]
&&
return
$RES
fi
# use install_names
;;
...
...
bin/serv
View file @
a14f59c0
...
...
@@ -98,12 +98,13 @@ is_active_systemd && CMD="systemd"
SERVICETYPE
=
$CMD
ANYSERVICE
=
$(
which anyservice 2>/dev/null
>
/dev/null
)
ANYSERVICE
=
$(
which anyservice 2>/dev/null
)
ANYSERVDIR
=
"/etc/systemd-lite"
ANYSYSDDIR
=
"/lib/systemd/system"
}
# TODO: done it on anyservice part
is_anyservice
()
{
local
SERVICE
=
"
$1
"
...
...
@@ -111,8 +112,11 @@ is_anyservice()
[
-n
"
$ANYSERVICE
"
]
||
return
1
# not, if there is regular service with the name
[
-d
"
$INITDIR
/
$SERVICE
"
]
&&
return
1
# yes, if the service is anyservice driven
[
-r
"
$ANYSERVDIR
/
$SERVICE
.service"
]
# yes, the service is anyservice driven
[
-r
"
$ANYSERVDIR
/
$SERVICE
.service"
]
&&
return
0
# yes, the service can be anyservice driven
[
-r
"
$ANYSYSDDIR
/
$SERVICE
.service"
]
&&
return
0
return
1
}
...
...
bin/serv-disable
View file @
a14f59c0
...
...
@@ -23,6 +23,8 @@ load_helper serv-status
# Enable service by default
serv_disable
()
{
local
SERVICE
=
"
$1
"
is_service_running
$1
&&
{
serv_stop
$1
||
return
;
}
is_service_autostart
$1
||
{
echo
"Service
$1
already disabled for startup"
&&
return
;
}
...
...
bin/serv-enable
View file @
a14f59c0
...
...
@@ -21,15 +21,15 @@ load_helper serv-start
load_helper serv-status
# Enable service by default
serv_enable
()
__
serv_enable
()
{
is_service_running
$1
||
serv_start
$1
||
return
local
SERVICE
=
"
$1
"
is_service_autostart
$1
&&
echo
"Service
$1
already enabled for startup"
&&
return
case
$SERVICETYPE
in
service-chkconfig
)
# can't use is_anyservice here
if
[
!
-d
"
$INITDIR
/
$SERVICE
"
]
&&
[
-n
"
$ANYSERVICE
"
]
&&
[
-r
"
$ANYSYSDDIR
/
$SERVICE
.service"
]
;
then
if
is_anyservice
$SERVICE
;
then
sudocmd anyservice
$SERVICE
on
return
fi
...
...
@@ -52,3 +52,10 @@ serv_enable()
esac
}
serv_enable
()
{
__serv_enable
"
$1
"
||
return
# start if need
is_service_running
$1
||
serv_start
$1
||
return
}
bin/serv-status
View file @
a14f59c0
...
...
@@ -20,9 +20,11 @@
# FIXME: sudo ask password, but we do not print command before
is_service_running
()
{
local
SERVICE
=
"
$1
"
case
$SERVICETYPE
in
service-chkconfig|service-upstart
)
if
is_anyservice
$
SERVICE
;
then
if
is_anyservice
$
1
;
then
$SUDO
anyservice
$1
status
>
/dev/null
return
fi
...
...
@@ -43,12 +45,16 @@ is_service_running()
# FIXME: sudo ask password, but we do not print command before
is_service_autostart
()
{
local
SERVICE
=
"
$1
"
case
$SERVICETYPE
in
service-chkconfig|service-upstart
)
if
is_anyservice
$SERVICE
;
then
# if is registered, assume it is autostarted
return
0
if
is_anyservice
$1
;
then
# HACK: if is registered, assume it is autostarted
[
-r
"
$ANYSERVDIR
/
$SERVICE
.service"
]
return
fi
# FIXME: check for current runlevel
LANG
=
C
$SUDO
chkconfig
$1
--list
|
grep
-q
"[35]:on"
;;
...
...
eepm.spec
View file @
a14f59c0
# This spec is backported to ALTLinux p8 automatically by rpmbph script from etersoft-build-utils.
#
Name: eepm
Version: 1.8.
7
Version: 1.8.
8
Release: alt0.M80P.1
Summary: Etersoft EPM package manager
...
...
@@ -67,9 +67,14 @@ chmod a+x %buildroot%_datadir/%name/{serv-,epm-}*
%_sysconfdir/bash_completion.d/cerv
%changelog
*
Sun Aug 14 2016 Vitaly Lipatov <lav@altlinux.ru> 1.8.7
-alt0.M80P.1
*
Mon Aug 15 2016 Vitaly Lipatov <lav@altlinux.ru> 1.8.8
-alt0.M80P.1
- backport to ALTLinux p8 (by rpmbph script)
* Mon Aug 15 2016 Vitaly Lipatov <lav@altlinux.ru> 1.8.8-alt1
- epm-install: skip low-level when install by path
- anyservice support fixes
- serv: some anyssh fixes
* Sun Aug 14 2016 Vitaly Lipatov <lav@altlinux.ru> 1.8.7-alt1
- realize autoorphans/autoremove for zypper >= 1.9.2 in SUSE
- introduce epm remove-old-kernels command
...
...
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