• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Lee Rowlett
    3. Posts
    • Profile
    • Following 19
    • Followers 7
    • Topics 17
    • Posts 276
    • Best 31
    • Controversial 0
    • Groups 2

    Posts made by Lee Rowlett

    • RE: E-mail Notification

      Hi,

      i have got it working but had to write a seperate query to get hostname. it is hard to write a step by step as you can customize it to however you want and use any mail protocol, i am using sendmail/mailutils - below is what i did.

      edit the file …/fog/service/Post_Stage3.php

      just before line: echo “##”; write you’re mail function i.e.

      if ( checkOut( $conn, $jobid ) )
      {
      [B]mail(“emailaddress@tosendto”,“$hostname - Image Task Completed”, “$hostname has been successfully imaged”);[/B]
      echo “##”;

      // Now update the imaging log.
      @logImageTask( $conn, “e”, $hostid );

      if you would like to get the hostname in the email - you have to include this, it is another query and there may be a cleaner way to do this but for now put this anywhere before the if statement put…

      $hst = “SELECT hostName FROM hosts WHERE hostID like '”.$hostid.“'”;
      $res1 = mysql_query( $hst, $conn ) or die( mysql_error() );
      $ar1 = mysql_fetch_object($res1);
      $hostname = $ar1->hostName;

      optional:
      on the server install sendmail/mailutils
      apt-get install sendmail
      apt-get install mailutils

      recommend stopping sendmail running a daemon.

      hope this helps

      …thanks for the guidance Fernando

      posted in Feature Request
      Lee RowlettL
      Lee Rowlett
    • RE: E-mail Notification

      The PXE file hasn’t the hostname

      posted in Feature Request
      Lee RowlettL
      Lee Rowlett
    • RE: E-mail Notification

      want to try and avoid writing a new query but unless you got any other idea?.. thanks for the help btw

      posted in Feature Request
      Lee RowlettL
      Lee Rowlett
    • RE: E-mail Notification

      this didn’t work 😞 hostname is blank

      posted in Feature Request
      Lee RowlettL
      Lee Rowlett
    • RE: E-mail Notification

      of course!! thank you, as I say stupid mental block! lol

      posted in Feature Request
      Lee RowlettL
      Lee Rowlett
    • RE: E-mail Notification

      hi, got this working perfectly now thanks for pointing me in the right direction! 😄 the only thing i need to do in Post_Stage3.php is get the hostname to put into the mail function as Post_Stage3.php only pulls hostid and i’m having a complete mental block on how to get hostname without creating a new function or mysql connection. i know the functions there but cannot remember! lol

      posted in Feature Request
      Lee RowlettL
      Lee Rowlett
    • RE: Hostname Change & Joining Domain Before Sysprep Runs (XP & Win7!)

      0.33 already has some alternative for changing the hostname by making changes using reg files. (HOSTNAME EARLY) this would conflict with this and i don’t it’s being included in 0.33. it would be same process and code for 0.33 though 🙂

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: Windows 7 and page file

      I’m in the same boat as with bash experience - anybody got any ideas how to debug this?

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: FOG 0.33 - What's coming?

      There is already a tutorial, admittedly abit lengthy:
      [url]http://fogproject.org/forum/threads/hostname-change-joining-domain-before-sysprep-runs-xp-win7.3332/#post-7964[/url]

      I can talk you through it if you want. 🙂

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: FOG 0.33 - What's coming?

      “re: “It would be awesome to include the option of tweaking sysprep.inf / unattend.xml to change the hostname and join an AD before booting the computer after deployment.” We use Powershell for that. The Unattend.xml does it all, we log into the desktop and run our Finalize.ps1 which enables and sets a password for the local administrator account, joins the computer to the domain and restarts the computer.”

      I use FOG to change the unattend.xml before it reboots after imaging so before it even boots into sysprep all options are set as needed and jsut let sysprep take care of it all - never fails and requires no additional reboots after imaging (like changing hostname, adding to domain) because it’s already all correct before booting into windows 🙂

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: Windows 7 and page file

      actually scrap that, because it mounts the device… it’s this if statement that seems to be the culprit…

      if [ “$?” = “0” ]; then

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: Windows 7 and page file

      nothing has been modified to affect this as far as i can see however when uploading windows 7 it does not even echo “removing page file” etc like the settings would suggest… so for some reason it’s not detecting $ignorepg is set to 1 but only for win7/8!?!, may remove the if statement and test this. will come back to you…

      [FONT=Ubuntu][COLOR=#333333]FOG_UPLOADIGNOREPAGEHIBER is set to 1 and this is the code in init.gz fog script.[/COLOR][/FONT]

      if [ “$ignorepg” = “1” ]; then
      #if [ “$osid” != “5” ]; then
      echo -n " * Mounting device…“;
      mkdir /ntfs &>/dev/null
      ntfs-3g -o force,rw $part /ntfs
      if [ “$?” = “0” ]; then
      echo “Done”;
      echo -n " * Removing page file…”;
      rm -f “/ntfs/pagefile.sys”;
      echo “Done”;

      echo -n " * Removing hibernate file…";
      rm -f “/ntfs/hiberfil.sys”
      echo “Done”;

      umount /ntfs;
      else
      echo “Failed”;
      fi
      #fi
      fi

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: Windows 7 and page file

      thanks for the info but i was hoping to keep it enabled but remove it from the image and let windows regenerate it after it imaged. if not will do this for hibernation but will still need to tackle the pagefile.sys 🙂

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: Windows 7 and page file

      doesn’t seem to be - using generalize and unattend

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: Windows 7 and page file

      …just to add to this it also doesn’t delete the hibernation file either C:\pagefile.sys & C:\hiberfil.sys are adding 8GB to the image size! 😞 i’m assuming it’s to do with the multi partitions - what would be the best way to manually delete these before uploading to fog? maybe utilising fog debug? any help would be muchly appreciated!

      posted in General
      Lee RowlettL
      Lee Rowlett
    • Windows 7 and page file

      Hi all,

      I’ve noticed when uploading a windows 7 image the pagefile does not get removed like it does with XP… is there any reason why as we’re trying to keep the image as small as possible!

      Thanks

      posted in General
      Lee RowlettL
      Lee Rowlett
    • RE: Backup Feature for user profiles/Data

      FOG Code in the init

      posted in Tutorials
      Lee RowlettL
      Lee Rowlett
    • RE: Backup Feature for user profiles/Data

      .

      posted in Tutorials
      Lee RowlettL
      Lee Rowlett
    • Backup Feature for user profiles/Data

      Hi All,

      just to let you know i’ve successfully been able to backup users profile before imaging.

      FOG takes a direct copy of doc and settings (xp) or users (win7/8) - images the machine then pulls the backup back down to the newly machine under root C:\MachineName-UserBackup

      helps not to lose data if no folder redirection is setup. if anyone interested i can post the mods you need to make to the init.gz…

      also if considered for main fog code was thinking maybe have a tick box under host to say whether to choose whether to backup or not. thoughts?

      posted in Tutorials
      Lee RowlettL
      Lee Rowlett
    • 1
    • 2
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 10 / 14