• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Conditional execution of a snapin ?

    Scheduled Pinned Locked Moved Solved
    General
    3
    6
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      Cyril Fleury
      last edited by

      Hi,
      I have a script deployed by a snapin that works when I created a task from advanced tab, but fail after reimaging because it need domain credentials.
      How can I make some snapins to waiting for domain integration ? or don’t removing the task if the exit code is not good in the first run ?

      1 Reply Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott
        last edited by

        Why not refactor the snapin to work without those requirements?

        I’m pretty sure fog client will attempt to rename and join your system to a domain before the snapin runs (and your device will reboot before it will run as well). Maybe there?

        Can you provide your Client logs?

        What Version of the FOG Client are you running?
        What Version of the FOG Server are you running?

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • J
          Joe Schmitt Senior Developer
          last edited by

          @Cyril-Fleury said in Conditional execution of a snapin ?:

          How can I make some snapins to waiting for domain integration ?

          Are you using a network share in your script?

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          1 Reply Last reply Reply Quote 0
          • C
            Cyril Fleury
            last edited by

            Yes, it access to a network share, and fix ACL in local filesystem.
            I added more verification step in the script, and now it just works.
            My bad.

            Fog Version 1.3.4 (SVN Revision: 6066), client 0.11.9

            Snapin Log in Report Management:

            modif_acl_oubliee_v1	Complete	-1		2017-04-03	16:01:39
            modif_acl_oubliee_v1	Complete	0		2017-04-03	16:01:39
            

            fog.log

            ------------------------------------------------------------------------------
            --------------------------------HostnameChanger-------------------------------
            ------------------------------------------------------------------------------
             05/04/2017 13:10 Client-Info Client Version: 0.11.9
             05/04/2017 13:10 Client-Info Client OS:      Windows
             05/04/2017 13:10 Client-Info Server Version: 1.3.4
             05/04/2017 13:10 Middleware::Response Success
             05/04/2017 13:10 HostnameChanger Checking Hostname
             05/04/2017 13:10 HostnameChanger Removing host from domain
             05/04/2017 13:10 HostnameChanger Renaming host to test-deploy
             05/04/2017 13:10 Power Creating shutdown request
             05/04/2017 13:10 Power Parameters: /r /c "FOG needs to rename your computer" /t 0
             05/04/2017 13:10 Bus {
              "self": true,
              "channel": "Power",
              "data": "{\r\n  \"action\": \"shuttingdown\"\r\n}"
            }
             05/04/2017 13:10 Bus Emmiting message on channel: Power
            ------------------------------------------------------------------------------
            
             05/04/2017 13:12 Service Starting service
            
            ------------------------------------------------------------------------------
            --------------------------------HostnameChanger-------------------------------
            ------------------------------------------------------------------------------
             05/04/2017 13:13 Client-Info Client Version: 0.11.9
             05/04/2017 13:13 Client-Info Client OS:      Windows
             05/04/2017 13:13 Client-Info Server Version: 1.3.4
             05/04/2017 13:13 Middleware::Response Success
             05/04/2017 13:13 HostnameChanger Checking Hostname
             05/04/2017 13:13 HostnameChanger Hostname is correct
             05/04/2017 13:13 HostnameChanger Attempting to join domain
             05/04/2017 13:13 HostnameChanger Success, code =  0
             05/04/2017 13:13 Power Creating shutdown request
             05/04/2017 13:13 Power Parameters: /r /c "Host joined to Active Directory, restart required" /t 0
             05/04/2017 13:13 Bus {
              "self": true,
              "channel": "Power",
              "data": "{\r\n  \"action\": \"shuttingdown\"\r\n}"
            }
             05/04/2017 13:13 Bus Emmiting message on channel: Power
            ------------------------------------------------------------------------------
            
             05/04/2017 13:16 Service Starting service
            
            ------------------------------------------------------------------------------
            --------------------------------HostnameChanger-------------------------------
            ------------------------------------------------------------------------------
             05/04/2017 12:16 Client-Info Client Version: 0.11.9
             05/04/2017 12:16 Client-Info Client OS:      Windows
             05/04/2017 12:16 Client-Info Server Version: 1.3.4
             05/04/2017 12:16 Middleware::Response Success
             05/04/2017 12:16 HostnameChanger Checking Hostname
             05/04/2017 12:16 HostnameChanger Hostname is correct
             05/04/2017 12:16 HostnameChanger Attempting to join domain
             05/04/2017 12:16 HostnameChanger Host is already joined to target domain
            ------------------------------------------------------------------------------
            
            
            ------------------------------------------------------------------------------
            ---------------------------------SnapinClient---------------------------------
            ------------------------------------------------------------------------------
             05/04/2017 12:16 Client-Info Client Version: 0.11.9
             05/04/2017 12:16 Client-Info Client OS:      Windows
             05/04/2017 12:16 Client-Info Server Version: 1.3.4
             05/04/2017 12:16 Middleware::Response Success
             05/04/2017 12:16 SnapinClient Snapin Found:
             05/04/2017 12:16 SnapinClient     ID: 108
             05/04/2017 12:16 SnapinClient     Name: modif_acl_oubliee_v2
             05/04/2017 12:16 SnapinClient     Created: 2017-04-05 11:17:40
             05/04/2017 12:16 SnapinClient     Action: 
             05/04/2017 12:16 SnapinClient     Pack: False
             05/04/2017 12:16 SnapinClient     Hide: False
             05/04/2017 12:16 SnapinClient     Server: 
             05/04/2017 12:16 SnapinClient     TimeOut: 0
             05/04/2017 12:16 SnapinClient     RunWith: cmd.exe
             05/04/2017 12:16 SnapinClient     RunWithArgs: /c
             05/04/2017 12:16 SnapinClient     Args: 
             05/04/2017 12:16 SnapinClient     File: modif_acl_oubliee_v2.bat
             05/04/2017 12:16 Middleware::Communication Download: http://srv-image/fog/service/snapins.file.php?mac=F0:4D:A2:30:6D:81||00:00:00:00:00:00:00:E0&taskid=108
             05/04/2017 12:17 SnapinClient C:\Program Files (x86)\FOG\tmp\modif_acl_oubliee_v2.bat
             05/04/2017 12:17 Bus {
              "self": true,
              "channel": "Notification",
              "data": "{\r\n  \"title\": \"Installation de modif_acl_oubliee_v2\",\r\n  \"message\": \"Ne pas éteindre l'ordinateur tant que la tâche n'est pas terminée\"\r\n}"
            }
             05/04/2017 12:17 Bus Emmiting message on channel: Notification
             05/04/2017 12:17 SnapinClient Starting snapin...
             05/04/2017 12:18 SnapinClient Snapin finished
             05/04/2017 12:18 SnapinClient Return Code: 0
             05/04/2017 12:18 Bus {
              "self": true,
              "channel": "Notification",
              "data": "{\r\n  \"title\": \"modif_acl_oubliee_v2 installé\",\r\n  \"message\": \"L’installation est terminée, prêt pour l'utilisation\"\r\n}"
            }
             05/04/2017 12:18 Bus Emmiting message on channel: Notification
             05/04/2017 12:18 Middleware::Communication URL: http://srv-image/fog/service/snapins.checkin.php?taskid=108&exitcode=0&mac=F0:4D:A2:30:6D:81||00:00:00:00:00:00:00:E0&newService&json
            ------------------------------------------------------------------------------
            
            ------------------------------------------------------------------------------
            --------------------------------HostnameChanger-------------------------------
            ------------------------------------------------------------------------------
             05/04/2017 12:20 Client-Info Client Version: 0.11.9
             05/04/2017 12:20 Client-Info Client OS:      Windows
             05/04/2017 12:20 Client-Info Server Version: 1.3.4
             05/04/2017 12:20 Middleware::Response Success
             05/04/2017 12:20 HostnameChanger Checking Hostname
             05/04/2017 12:20 HostnameChanger Hostname is correct
             05/04/2017 12:20 HostnameChanger Attempting to join domain
             05/04/2017 12:20 HostnameChanger Host is already joined to target domain
            ------------------------------------------------------------------------------
            
            ------------------------------------------------------------------------------
            ---------------------------------SnapinClient---------------------------------
            ------------------------------------------------------------------------------
             05/04/2017 12:20 Client-Info Client Version: 0.11.9
             05/04/2017 12:20 Client-Info Client OS:      Windows
             05/04/2017 12:20 Client-Info Server Version: 1.3.4
             05/04/2017 12:20 Middleware::Response No valid tasks found
            ------------------------------------------------------------------------------
            
            Tom ElliottT 1 Reply Last reply Reply Quote 0
            • Tom ElliottT
              Tom Elliott @Cyril Fleury
              last edited by

              @Cyril-Fleury So this can be solved?

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              C 1 Reply Last reply Reply Quote 0
              • C
                Cyril Fleury @Tom Elliott
                last edited by

                @Tom-Elliott Yes. Where can I do it ?

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post

                159

                Online

                12.0k

                Users

                17.3k

                Topics

                155.2k

                Posts
                Copyright © 2012-2024 FOG Project