@Tom-Elliott Yes. Where can I do it ?
Latest posts made by Cyril Fleury
-
RE: Conditional execution of a snapin ?
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 ------------------------------------------------------------------------------
-
Conditional execution of a snapin ?
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 ? -
New page in image management tab
hello,
I use fog 0.32, and I added a page to see the date of the backup and which hosts use this backup. I saw that there are many changes in version 0.33, my modification will it still possible?
below the changes
[CODE]diff -u includes.old//images.edit.include.php includes//images.edit.include.php
— includes.old//images.edit.include.php 2012-09-27 15:39:46.336744331 +0200
+++ includes//images.edit.include.php 2012-09-27 15:39:46.324744331 +0200
@@ -190,10 +190,51 @@
echo ( “<p>”._(“Are you sure you would like to remove this image?”).“</p>” );
echo ( “<p><a href=”?node=" . $_GET[“node”] . “&sub=” . $_GET[“sub”] . “&rmimageid=” . $ar[“imageID”] . “”><img class=“link” src=“images/delete.png”></a></p>" );
}-
// Onglet detail sur le fichier de sauvegarde
-
else if ( $_GET["tab"] == "detail" )
-
{
-
$tmpSD = getStorageRootByGroupID( $conn, $ar["imageNFSGroupID"] );
-
if ( $tmpSD != null )
-
$imgfile = $tmpSD . $ar["imagePath"];
-
echo ( "<p>"._("Image file on server : ") . $imgfile . "<br>" );
-
if ( file_exists($imgfile) )
-
{
-
if ( is_dir ($imgfile) )
-
echo ( _("This is a directory, Multiple partitions are backuped.") . "<br>" );
-
echo ( _("Image file size : ") . filesize_n ($imgfile) . " bytes <br>" );
-
echo ( _("Image file date : ") . date ("d F Y - H:i:s", filemtime ($imgfile)) . "<br>" );
-
}
-
else
-
echo ( _("No file on server yet, need to create a upload task.") . "<br>" );
-
echo ( "</p>" );
-
}
-
echo ( "</center>" );
}
-
// Onglet liste des ordinateurs membres de cette image.
-
if ( $_GET[“tab”] == “members” )
-
{
-
echo ( '<table width="100%" cellpadding="0" cellspacing="0" border="0">' );
-
echo ( '<thead>' );
-
echo ( '<tr class="header">');
-
echo ( '<td>' . _('Image Name'). '</td>' );
-
echo ( '<td width="230">' . _('MAC') . '</td>' );
-
echo ( '</tr>' );
-
echo ( '</thead>' );
-
echo ( '<tbody>' );
-
$sql = "select hostName, hostMAC from hosts where hostImage = '" . mysql_real_escape_string( $_GET["imageid"] ) . "'";
-
$res = mysql_query( $sql, $conn ) or die( mysql_error() );
-
while ( $ar = mysql_fetch_row( $res ) )
-
{
-
echo ( "<tr> <td>" . $ar[0] . "</td>" );
-
echo ( "<td>" . $ar[1] . "</td> </tr>" );
-
}
-
echo ( "</tbody> </table>" );
-
}
@@ -202,4 +243,15 @@
}
+// Contourner la limite de 2GB de filesize()
+function filesize_n($path)
+{-
$size = @filesize($path);
-
if( $size < 0 ){
-
ob_start();
-
system('ls -al "'.$path.'" | awk \'BEGIN {FS=" "}{print $5}\'');
-
$size = ob_get_clean();
-
}
-
return $size;
+}
diff -u includes.old//submenu.include.php includes//submenu.include.php
— includes.old//submenu.include.php 2012-09-27 15:39:46.336744331 +0200
+++ includes//submenu.include.php 2012-09-27 15:39:46.324744331 +0200
@@ -165,6 +165,8 @@
// Image Management: Edit
$FOGSubMenu->addItems(‘images’, array( _(‘General’) => “”,
_(‘Delete’) => “delete”,-
_('Detail') => "detail",
-
_('Members') => "members", ), 'imageid', 'Image Menu'); // Image Management: Notes
[/CODE]
-