Commit 380f5971 authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed files

parent dc885073
...@@ -458,10 +458,12 @@ if [ -n "$FORCEPM" ] ; then ...@@ -458,10 +458,12 @@ if [ -n "$FORCEPM" ] ; then
return return
fi fi
case $DISTRNAME in case $DISTRNAME in
ALTLinux) ALTLinux)
CMD="apt-rpm" CMD="apt-rpm"
#which ds-install 2>/dev/null >/dev/null && CMD=deepsolver-rpm #which ds-install 2>/dev/null >/dev/null && CMD=deepsolver-rpm
#which pkcon 2>/dev/null >/dev/null && CMD=packagekit-rpm
;; ;;
PCLinux) PCLinux)
CMD="apt-rpm" CMD="apt-rpm"
...@@ -531,19 +533,15 @@ esac ...@@ -531,19 +533,15 @@ esac
PMTYPE=$CMD PMTYPE=$CMD
} }
is_active_systemd() is_active_systemd()
{ {
local a local a
SYSTEMCTL=/bin/systemctl SYSTEMCTL=/bin/systemctl
SYSTEMD_CGROUP_DIR=/sys/fs/cgroup/systemd #[ -x "$SYSTEMCTL" ] || return
[ -x "$SYSTEMCTL" ] || return [ -d /run/systemd/system ] || return
[ -d "$SYSTEMD_CGROUP_DIR" ] || return #SYSTEMD_CGROUP_DIR=/sys/fs/cgroup/systemd
a='' mountpoint -q "$SYSTEMD_CGROUP_DIR" || return #[ -d "$SYSTEMD_CGROUP_DIR" ] || return
readlink /sbin/init | grep -q 'systemd' || return #cat /proc/1/comm | grep -q 'systemd' && return
# some hack
# shellcheck disable=SC2009
ps ax | grep '[s]ystemd' | grep -q -v 'systemd-udev'
} }
assure_distr() assure_distr()
...@@ -742,6 +740,9 @@ __serv_log_altlinux() ...@@ -742,6 +740,9 @@ __serv_log_altlinux()
postfix) postfix)
sudocmd tail -f /var/log/mail/all /var/log/mail/errors sudocmd tail -f /var/log/mail/all /var/log/mail/errors
;; ;;
sshd)
sudocmd tail -f /var/log/auth/all
;;
cups) cups)
sudocmd tail -f /var/log/cups/access_log /var/log/cups/error_log sudocmd tail -f /var/log/cups/access_log /var/log/cups/error_log
;; ;;
...@@ -1168,15 +1169,19 @@ fi ...@@ -1168,15 +1169,19 @@ fi
# ALT Linux based # ALT Linux based
if distro altlinux-release ; then if distro altlinux-release ; then
# TODO: use os-release firsly
DISTRIB_ID="ALTLinux" DISTRIB_ID="ALTLinux"
if has Sisyphus ; then DISTRIB_RELEASE="Sisyphus" if has Sisyphus ; then DISTRIB_RELEASE="Sisyphus"
elif has "ALT Linux 7." ; then DISTRIB_RELEASE="p7" elif has "ALT Linux 7." ; then DISTRIB_RELEASE="p7"
elif has "ALT Linux t7." ; then DISTRIB_RELEASE="t7" elif has "ALT Linux t7." ; then DISTRIB_RELEASE="t7"
elif has "ALT Linux 8." ; then DISTRIB_RELEASE="p8" elif has "ALT Linux 8." ; then DISTRIB_RELEASE="p8"
elif has "ALT .*8.[0-9]" ; then DISTRIB_RELEASE="p8" elif has "ALT .*8.[0-9]" ; then DISTRIB_RELEASE="p8"
elif has "ALT .*9.[0-9]" ; then DISTRIB_RELEASE="p9"
elif has "ALT p9 p9" ; then DISTRIB_RELEASE="p9"
elif has "Simply Linux 6." ; then DISTRIB_RELEASE="p6" elif has "Simply Linux 6." ; then DISTRIB_RELEASE="p6"
elif has "Simply Linux 7." ; then DISTRIB_RELEASE="p7" elif has "Simply Linux 7." ; then DISTRIB_RELEASE="p7"
elif has "Simply Linux 8." ; then DISTRIB_RELEASE="p8" elif has "Simply Linux 8." ; then DISTRIB_RELEASE="p8"
elif has "Simply Linux 9." ; then DISTRIB_RELEASE="p9"
elif has "ALT Linux 6." ; then DISTRIB_RELEASE="p6" elif has "ALT Linux 6." ; then DISTRIB_RELEASE="p6"
elif has "ALT Linux p8" ; then DISTRIB_RELEASE="p8" elif has "ALT Linux p8" ; then DISTRIB_RELEASE="p8"
elif has "ALT Linux p7" ; then DISTRIB_RELEASE="p7" elif has "ALT Linux p7" ; then DISTRIB_RELEASE="p7"
...@@ -2238,11 +2243,20 @@ $(get_help HELPOPT) ...@@ -2238,11 +2243,20 @@ $(get_help HELPOPT)
" "
} }
detect_virt()
{
which systemd-detect-virt >/dev/null 2>/dev/null || return
a= systemd-detect-virt
}
print_version() print_version()
{ {
echo "Service manager version 2.5.8" local on_text="(host system)"
echo "Running on $($DISTRVENDOR) with $SERVICETYPE" local virt="$(detect_virt)"
echo "Copyright (c) Etersoft 2012-2018" [ "$virt" = "none" ] || [ "$virt" = "" ] || on_text="(under $virt)"
echo "Service manager version 3.1.0"
echo "Running on $($DISTRVENDOR) $on_text with $SERVICETYPE"
echo "Copyright (c) Etersoft 2012-2019"
echo "This program may be freely redistributed under the terms of the GNU AGPLv3." echo "This program may be freely redistributed under the terms of the GNU AGPLv3."
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment