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
238c48e1
Commit
238c48e1
authored
Nov 08, 2019
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
is_active_systemd: rewrite systemd detection
parent
3d1ac884
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
epm-sh-functions
bin/epm-sh-functions
+6
-8
No files found.
bin/epm-sh-functions
View file @
238c48e1
...
...
@@ -554,18 +554,16 @@ esac
PMTYPE
=
$CMD
}
# https://unix.stackexchange.com/questions/196166/how-to-find-out-if-a-system-uses-sysv-upstart-or-systemd-initsystem
is_active_systemd
()
{
local
a
SYSTEMCTL
=
/bin/systemctl
SYSTEMD_CGROUP_DIR
=
/sys/fs/cgroup/systemd
[
-x
"
$SYSTEMCTL
"
]
||
return
[
-d
"
$SYSTEMD_CGROUP_DIR
"
]
||
return
#a='' mountpoint -q "$SYSTEMD_CGROUP_DIR" || return
cat
/proc/1/cmdline |
grep
-q
'systemd'
&&
return
cat
/proc/1/cmdline |
grep
-q
'/sbin/init'
||
return
readlink
/sbin/init |
grep
-q
'systemd'
||
return
#[ -x "$SYSTEMCTL" ] || return
[
-d
/run/systemd/system
]
||
return
#SYSTEMD_CGROUP_DIR=/sys/fs/cgroup/systemd
#[ -d "$SYSTEMD_CGROUP_DIR" ] || return
#cat /proc/1/comm | grep -q 'systemd' && return
}
assure_distr
()
...
...
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