Client install roles added
This commit is contained in:
parent
5e8410eac6
commit
990114e28b
47 changed files with 4181 additions and 0 deletions
33
roles/lmn_printer/files/onLogin
Normal file
33
roles/lmn_printer/files/onLogin
Normal file
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
# DO NOT MODIFY THIS SCRIPT!
|
||||
# For custom scripts use the hookdir /etc/linuxmuster-linuxclient7/onLogin.d
|
||||
|
||||
# This schript is called in user context when a user logs in
|
||||
try:
|
||||
import os, sys
|
||||
#import traceback
|
||||
from linuxmusterLinuxclient7 import logging, hooks, shares, user, constants, gpo, computer, environment
|
||||
|
||||
logging.info("====== onLogin started ======")
|
||||
|
||||
# mount sysvol
|
||||
rc, sysvolPath = shares.getLocalSysvolPath()
|
||||
if rc:
|
||||
environment.export(f"SYSVOL={sysvolPath}")
|
||||
|
||||
# process GPOs
|
||||
gpo.processAllPolicies()
|
||||
|
||||
logging.info("======> onLogin end ======")
|
||||
|
||||
except Exception as e:
|
||||
try:
|
||||
#traceback.print_exc()
|
||||
logging.exception(e)
|
||||
except:
|
||||
print("A fatal error occured!")
|
||||
|
||||
# We need to catch all exceptions and return 0 in any case!
|
||||
# If we do not return 0, login will FAIL FOR EVERYONE!
|
||||
sys.exit(0)
|
Loading…
Add table
Add a link
Reference in a new issue