Skip to content

Commit 5a29e44

Browse files
authored
Update hooks.py
Solve [issue 48](#48), order of login-script-execution
1 parent a3c2781 commit 5a29e44

File tree

1 file changed

+2
-2
lines changed
  • usr/lib/python3/dist-packages/linuxmusterLinuxclient7

1 file changed

+2
-2
lines changed

usr/lib/python3/dist-packages/linuxmusterLinuxclient7/hooks.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def runLocalHook(hookType):
5454
hookDir = _getLocalHookDir(hookType)
5555
if os.path.exists(hookDir):
5656
_prepareEnvironment()
57-
for fileName in os.listdir(hookDir):
57+
for fileName in sorted(os.listdir(hookDir)):
5858
filePath = hookDir + "/" + fileName
5959
_runHookScript(filePath)
6060
logging.info("===> Finished running local hook on{0} ===".format(hookType.name))
@@ -216,4 +216,4 @@ def _runHookScript(filePath):
216216

217217
def _writeEnvironment(environment):
218218
for key in environment:
219-
os.putenv(key, environment[key])
219+
os.putenv(key, environment[key])

0 commit comments

Comments
 (0)