Skip to content

Commit b76389b

Browse files
committed
Fix: onLogin script when /etc/profile.d is executed with sh
1 parent 9f4af97 commit b76389b

File tree

5 files changed

+10
-26
lines changed

5 files changed

+10
-26
lines changed
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
scriptDir=$(/usr/sbin/linuxmuster-linuxclient7 get-constant scriptDir)
2-
source $scriptDir/executeHookWithEnvFix.sh onLogin
2+
tmpEnvFile=$(/usr/sbin/linuxmuster-linuxclient7 get-constant tmpEnvironmentFilePath)
3+
4+
rm -f $tmpEnvFile
5+
6+
LinuxmusterLinuxclient7EnvFixActive=1 PATH=$PATH:$scriptDir/env-fix $scriptDir/onLogin
7+
8+
. $tmpEnvFile
9+
rm -f $tmpEnvFile

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def _apply(templatePath):
5050
# never ever overwrite sssd.conf, this will lead to issues!
5151
# sssd.conf is written by `realm join`!
5252
if targetFilePath in constants.notTemplatableFiles:
53-
logging.warning("Skipping forbidden file {}".format(targetFilePath))
53+
logging.warning(f"Skipping forbidden file {targetFilePath}")
5454
return True
5555

5656
# create target directory
@@ -61,7 +61,7 @@ def _apply(templatePath):
6161
fileData = _stripComment(fileData)
6262

6363
# write config file
64-
logging.debug("-> to {}".format(targetFilePath))
64+
logging.debug(f"-> to {targetFilePath}")
6565
with open(targetFilePath, 'w') as targetFile:
6666
targetFile.write(fileData)
6767

usr/sbin/lmn-export renamed to usr/share/linuxmuster-linuxclient7/scripts/env-fix/lmn-export

File renamed without changes.

usr/sbin/lmn-unset renamed to usr/share/linuxmuster-linuxclient7/scripts/env-fix/lmn-unset

File renamed without changes.

usr/share/linuxmuster-linuxclient7/scripts/executeHookWithEnvFix.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)