Advertisement
Guest User

Untitled

a guest
Feb 6th, 2019
422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.28 KB | None | 0 0
  1. diff U5 orig/opsi-client-agent/files/opsi/setup412.opsiscript mod/opsi-client-agent/files/opsi/setup412.opsiscript
  2. --- orig/opsi-client-agent/files/opsi/setup412.opsiscript   Thu Oct 18 17:19:13 2018
  3. +++ mod/opsi-client-agent/files/opsi/setup412.opsiscript    Mon Feb  4 11:45:54 2019
  4. @@ -729,29 +729,35 @@
  5.         comment "Try to open new network connection"
  6.         set $INST_Authenticated$ = opsiservice_authenticated($INST_Service_User$,$Inst_Service_Password$,$OCD_config_service.url$,"false")
  7.         set $INST_userIsAdmin$ = opsiservice_UserIsAdmin()
  8.     endif
  9.     if ($INST_Authenticated$ = "false") or ($INST_userIsAdmin$ = "false")
  10. -       comment "was not authenticated as admin-> retry interactive"
  11. -       set $INST_Authenticated$ = opsiservice_authenticated("","",$OCD_config_service.url$,"true")
  12. -       set $INST_userIsAdmin$ = opsiservice_UserIsAdmin()
  13. -   endif
  14. -   if ($INST_Authenticated$ = "false") or ($INST_userIsAdmin$ = "false")
  15. -       comment "was not authenticated as admin-> giving up"
  16.         if $INST_Authenticated$ = "true"
  17.             LogWarning "We are authenticated but no admin login"
  18.             LogWarning "Authenitcated user: " + $INST_Service_User$ + " is not a opsiadmin"
  19.             comment "We go on and will see if this user has the credentials to create a client"
  20. -       else
  21. -           logerror "We are not authenticated"
  22. -           logerror "No admin login"
  23. -           pause "Error: No admin login - exiting"
  24. -           isFatalError
  25. +       else
  26. +           comment "was not authenticated-> retry interactive"
  27. +           set $INST_Authenticated$ = opsiservice_authenticated("","",$OCD_config_service.url$,"true")
  28. +           set $INST_userIsAdmin$ = opsiservice_UserIsAdmin()
  29. +           if ($INST_Authenticated$ = "false") or ($INST_userIsAdmin$ = "false")
  30. +               comment "was not authenticated as admin-> giving up"
  31. +               if $INST_Authenticated$ = "true"
  32. +                   LogWarning "We are authenticated but no admin login"
  33. +                   LogWarning "Authenitcated user: " + $INST_Service_User$ + " is not a opsiadmin"
  34. +                   comment "We go on and will see if this user has the credentials to create a client"
  35. +               else
  36. +                   logerror "We are not authenticated"
  37. +                   logerror "No admin login"
  38. +                   pause "Error: No admin login - exiting"
  39. +                   isFatalError
  40. +               endif
  41. +           endif
  42.         endif
  43.     endif
  44.     LoadProductProperties $INST_ClientId$ "opsi-client-agent"
  45.  
  46.     comment "get MAC and IP for Service connection"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement