aboutsummaryrefslogtreecommitdiff
path: root/src/usr/bin/logout-manager-cli
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/bin/logout-manager-cli')
-rwxr-xr-xsrc/usr/bin/logout-manager-cli8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/usr/bin/logout-manager-cli b/src/usr/bin/logout-manager-cli
index fde7d55..c325db4 100755
--- a/src/usr/bin/logout-manager-cli
+++ b/src/usr/bin/logout-manager-cli
@@ -13,16 +13,17 @@
# https://stackoverflow.com/questions/3061/calling-a-function-of-a-module-by-using-its-name-a-string/12025554#12025554
# Improve:
# Dependencies:
-# Devuan: python3-dotenv python3
+# dep-devuan: python3-dotenv, python3
# Documentation:
-import os, platform, sys, argparse
+import os, sys, argparse
+from distro import linux_distribution
from dotenv import load_dotenv
# all this to load the libpath
try:
defaultdir="/etc/sysconfig"
- thisplatform = platform.platform().lower()
+ thisplatform = linux_distribution()[0].lower()
if 'debian' in thisplatform or 'devuan' in thisplatform:
defaultdir="/etc/default"
# load_dotenv keeps existing environment variables as higher precedent
@@ -32,6 +33,7 @@ except:
if 'LOGOUT_MANAGER_LIBPATH' in os.environ:
for i in os.environ['LOGOUT_MANAGER_LIBPATH'].split(":"):
sys.path.append(i)
+sys.path.append("/usr/share/logout-manager")
import lmlib
def eprint(*args, **kwargs):
bgstack15