Skip to content

Commit

Permalink
Locally modify PATH variable. #231 #236
Browse files Browse the repository at this point in the history
  • Loading branch information
jotyGill committed Sep 12, 2019
1 parent 0c3a20e commit afe8f6a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
27 changes: 9 additions & 18 deletions openpyn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,12 @@
__data_files__ = [("/opt/etc/init.d", ["./openpyn/S23openpyn"])]


# import gc
# print("\n".join(sorted({attrname for item in gc.get_objects() for attrname in dir(item) if attrname.startswith("__")})))
#
# print(__basefilepath__)
# print(__build_class__)
# print(__builtins__)
# print(__data_files__)
# print(__debug__)
# print(__doc__)
# print(__file__)
# print(__import__)
# print(__license__)
# print(__loader__)
# print(__name__)
# print(__package__)
# print(__path__)
# print(__spec__)
# print(__version__)
# locally modify the PATH variable, to get around issues on some distros
def add_to_path(bin_path):
# add pathseperator i.e ":"
bin_path_str = os.pathsep + bin_path
if bin_path_str not in os.environ["PATH"]:
os.environ["PATH"] += bin_path_str

add_to_path("/usr/sbin")
add_to_path("/sbin")
1 change: 0 additions & 1 deletion openpyn/scripts/update-systemd-resolved.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
# Define what needs to be called via DBus
DBUS_DEST="org.freedesktop.resolve1"
DBUS_NODE="/org/freedesktop/resolve1"
PATH="$PATH:/usr/sbin"

SCRIPT_NAME="${BASH_SOURCE[0]##*/}"

Expand Down

0 comments on commit afe8f6a

Please sign in to comment.