2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-21 18:50:28 +00:00

using execute binary of systemd to determine if systemd is enabled on this distro

This commit is contained in:
robin2008
2018-07-26 13:23:45 +08:00
parent 299570f550
commit 5e53fa6824

View File

@@ -425,7 +425,7 @@ if ($::INITIALINSTALL || $::FORCE || $::UPDATEINSTALL)
# The systemd only has LANG and PATH as default environmental variables,
# TERM is needed for KVM consoles(actually screen command needs TERM)
# import the TERM into systemd
if (-d "/usr/lib/systemd/system") {
if (-x "/usr/lib/systemd/systemd" || -x "/lib/systemd/systemd") {
my $term = $ENV{'TERM'};
if (!$term) {
$term = "vt100";