Hi,
Is it possible to add custom advanced tasks or modifying existing ones?
I would like to add some more tasks to the task management to start Acronis products on specific hosts.
Even modifying existing tasks would be great, because i don’t need most of them (ClamAV, Test Disk, Full Wipe, etc).
I’ve already figured out, that these files are responsible for creating the tasks:
/var/www/fog/commons/functions.include.php
/var/www/fog/management/lib/Host.class.php
/var/www/fog/management/includes/tasks.advanced.include.php (this one is the advanced task management page)
I have the kernel and initrd files for various Acronis products and i can boot them fine using the PXE menu:
LABEL fog.acrtrimg
[INDENT=1]kernel fog/acronis/acrmem[/INDENT]
[INDENT=1]append initrd=fog/acronis/acrtrimg quiet vga=0x314[/INDENT]
[INDENT=1]MENU LABEL Acronis True Image Home[/INDENT]
[INDENT=1]TEXT HELP[/INDENT]
[INDENT=1]Boot Acronis True Image Home[/INDENT]
[INDENT=1] [/INDENT]
This one boots Acronis True Image Home (i renamed the original kernel to acrmem and the original initrd to acrtrimg).
If i manually create a PXE file for a specific host (in /tftpboot/pxelinux.cfg) similar to what the task manager creates, then it works as well:
DEFAULT send
LABEL send
kernel fog/acronis/acrmem
append initrd=fog/acronis/acrtrimg quiet vga=0x314
(I named this one 01-08-2e-5f-08-99-b7, because the mac is 08:2e:5f:88:99:b7)
The problem with this method is that i must manually create the host specific PXE file myself everytime i want to automatically boot a host into a custom program (for example Acronis True Image Home), and manually delete the PXE file after it has loaded. Using the task manager would be more convenient.
I tried to modify the ‘Test Disk’ task, and it works to some degree. The only problem is, that FOG won’t delete the task after it has finished (=the program booted successfully). I can kill the task on the ‘Active Tasks’ page though.
The only thing i modified was the $output string in both functions.include.php and Host.class.php. I didn’t touch the task name, variables or anything else.
$output = “DEFAULT send\n
[INDENT=2]LABEL send\n[/INDENT]
[INDENT=2]kernel fog/acronis/acrmem\n[/INDENT]
[INDENT=2]append initrd=fog/acronis/acrtrimg quiet vga=0x314”;[/INDENT]
[INDENT=2] [/INDENT]
For me it seems that only FOG’s own tasks can work properly (which uses the FOG ramdisk), because custom tasks can’t report the status to the FOG server, and thus the tasks will never finish.
Can anyone help me further with this?