Commit bafab0c0 authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.64.39

parent 8db9d200
...@@ -34,7 +34,7 @@ SHAREDIR=$PROGDIR ...@@ -34,7 +34,7 @@ SHAREDIR=$PROGDIR
# will replaced with /etc/eepm during install # will replaced with /etc/eepm during install
CONFIGDIR=$PROGDIR/../etc CONFIGDIR=$PROGDIR/../etc
EPMVERSION="3.64.38" EPMVERSION="3.64.39"
# package, single (file), pipe, git # package, single (file), pipe, git
EPMMODE="package" EPMMODE="package"
...@@ -493,7 +493,7 @@ set_sudo() ...@@ -493,7 +493,7 @@ set_sudo()
# start error section # start error section
SUDO_TESTED="1" SUDO_TESTED="1"
if is_command doas && a='' doas -C /etc/doas.conf > /dev/null 2>&1 ; then if is_command doas && ! is_command sudo > /dev/null 2>&1 ; then
SUDO="doas" SUDO="doas"
SUDO_TESTED="0" SUDO_TESTED="0"
return "$SUDO_TESTED" return "$SUDO_TESTED"
...@@ -768,6 +768,19 @@ disabled_eget() ...@@ -768,6 +768,19 @@ disabled_eget()
$EGET "$@" $EGET "$@"
} }
get_json_value()
{
local field="$1"
echo "$field" | grep -q -E "^\[" || field='["'$field'"]'
epm tool json -b | grep -m1 -F "$field" | sed -e 's|.*[[:space:]]||' | sed -e 's|"\(.*\)"|\1|g'
}
get_json_values()
{
local field="$1"
echo "$field" | grep -q -E "^\[" || field="\[$(echo "$field" | sed 's/[^ ]*/"&"/g' | sed 's/ /,/g'),[0-9]*\]"
epm tool json -b | grep "^$field" | sed -e 's|.*[[:space:]]||' | sed -e 's|"\(.*\)"|\1|g'
}
__epm_assure_7zip() __epm_assure_7zip()
{ {
...@@ -1182,7 +1195,7 @@ serv_common() ...@@ -1182,7 +1195,7 @@ serv_common()
sudocmd sv $SERVICE "$@" sudocmd sv $SERVICE "$@"
;; ;;
*) *)
fatal "Have no suitable command for $SERVICETYPE" fatal "Have no suitable command for $SERVICETYPE in serv_common()"
;; ;;
esac esac
} }
...@@ -1217,7 +1230,7 @@ serv_disable() ...@@ -1217,7 +1230,7 @@ serv_disable()
sudocmd rm -fv /var/service/$SERVICE sudocmd rm -fv /var/service/$SERVICE
;; ;;
*) *)
fatal "Have no suitable command for $SERVICETYPE" fatal "Have no suitable command for $SERVICETYPE in serv_disable()"
;; ;;
esac esac
} }
...@@ -1276,7 +1289,7 @@ serv_enable() ...@@ -1276,7 +1289,7 @@ serv_enable()
sudocmd ln -s /etc/sv/$SERVICE /var/service/ sudocmd ln -s /etc/sv/$SERVICE /var/service/
;; ;;
*) *)
fatal "Have no suitable command for $SERVICETYPE" fatal "Have no suitable command for $SERVICETYPE in serv_enable()"
;; ;;
esac esac
} }
...@@ -1382,7 +1395,7 @@ serv_list_all() ...@@ -1382,7 +1395,7 @@ serv_list_all()
fi fi
;; ;;
*) *)
fatal "Have no suitable command for $SERVICETYPE" fatal "Have no suitable command for $SERVICETYPE in serv_list_all()"
;; ;;
esac esac
} }
...@@ -1563,7 +1576,7 @@ serv_restart() ...@@ -1563,7 +1576,7 @@ serv_restart()
sudocmd rc-service restart "$SERVICE" sudocmd rc-service restart "$SERVICE"
;; ;;
*) *)
fatal "Have no suitable command for $SERVICETYPE" fatal "Have no suitable command for $SERVICETYPE in serv_restart()"
;; ;;
esac esac
} }
...@@ -1596,7 +1609,7 @@ serv_start() ...@@ -1596,7 +1609,7 @@ serv_start()
sudocmd rc-service start "$SERVICE" sudocmd rc-service start "$SERVICE"
;; ;;
*) *)
fatal "Have no suitable command for $SERVICETYPE" fatal "Have no suitable command for $SERVICETYPE in serv_start()"
;; ;;
esac esac
} }
...@@ -1629,7 +1642,7 @@ is_service_running() ...@@ -1629,7 +1642,7 @@ is_service_running()
sudorun sv status "$SERVICE" >/dev/null 2>/dev/null sudorun sv status "$SERVICE" >/dev/null 2>/dev/null
;; ;;
*) *)
fatal "Have no suitable command for $SERVICETYPE" fatal "Have no suitable command for $SERVICETYPE in is_service_running()"
;; ;;
esac esac
} }
...@@ -1658,7 +1671,7 @@ is_service_autostart() ...@@ -1658,7 +1671,7 @@ is_service_autostart()
test -L "/var/service/$SERVICE" test -L "/var/service/$SERVICE"
;; ;;
*) *)
fatal "Have no suitable command for $SERVICETYPE" fatal "Have no suitable command for $SERVICETYPE in is_service_autostart()"
;; ;;
esac esac
} }
...@@ -1688,7 +1701,7 @@ serv_status() ...@@ -1688,7 +1701,7 @@ serv_status()
sudocmd sv status "$SERVICE" sudocmd sv status "$SERVICE"
;; ;;
*) *)
fatal "Have no suitable command for $SERVICETYPE" fatal "Have no suitable command for $SERVICETYPE in serv_status()"
;; ;;
esac esac
} }
...@@ -1721,7 +1734,7 @@ serv_stop() ...@@ -1721,7 +1734,7 @@ serv_stop()
sudocmd rc-service stop "$SERVICE" sudocmd rc-service stop "$SERVICE"
;; ;;
*) *)
fatal "Have no suitable command for $SERVICETYPE" fatal "Have no suitable command for $SERVICETYPE in serv_stop()"
;; ;;
esac esac
} }
...@@ -1804,7 +1817,7 @@ serv_usage() ...@@ -1804,7 +1817,7 @@ serv_usage()
sudocmd systemctl $SERVICE 2>&1 sudocmd systemctl $SERVICE 2>&1
;; ;;
*) *)
fatal "Have no suitable command for $SERVICETYPE" fatal "Have no suitable command for $SERVICETYPE in serv_usage()"
;; ;;
esac esac
...@@ -1955,6 +1968,12 @@ pkgmanager() ...@@ -1955,6 +1968,12 @@ pkgmanager()
{ {
local CMD local CMD
case $DISTRO_NAME in
"ALT Atomic")
echo "apm-rpm" && return
;;
esac
case $VENDOR_ID in case $VENDOR_ID in
alt) alt)
echo "apt-rpm" && return echo "apt-rpm" && return
...@@ -2919,6 +2938,8 @@ print_eepm_env() ...@@ -2919,6 +2938,8 @@ print_eepm_env()
cat <<EOF cat <<EOF
# -d | --base-distro-name # -d | --base-distro-name
DISTRNAME="$(echo $DISTRIB_ID)" DISTRNAME="$(echo $DISTRIB_ID)"
# --distro-name
FULLDISTRNAME="$(echo "$DISTRO_NAME")"
# -v | --base-version # -v | --base-version
DISTRVERSION="$(echo "$DISTRIB_RELEASE")" DISTRVERSION="$(echo "$DISTRIB_RELEASE")"
# distro dependent arch # distro dependent arch
......
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