• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. ch3i
    3. Posts
    • Profile
    • Following 1
    • Followers 4
    • Topics 37
    • Posts 916
    • Best 169
    • Controversial 0
    • Groups 1

    Posts made by ch3i

    • RE: SVN 3192 hangs

      Hi,

      Below informations of php (if it can help)

      php -v

      [CODE]PHP 5.4.39-0+deb7u1 (cli) (built: Mar 20 2015 15:16:28)
      Copyright © 1997-2014 The PHP Group
      Zend Engine v2.4.0, Copyright © 1998-2014 Zend Technologies
      [/CODE]

      php -m

      [CODE][PHP Modules]
      bcmath
      bz2
      calendar
      Core
      ctype
      curl
      date
      dba
      dom
      ereg
      exif
      fileinfo
      filter
      ftp
      gd
      gettext
      hash
      iconv
      json
      libxml
      mbstring
      mcrypt
      mhash
      mysql
      mysqli
      mysqlnd
      openssl
      pcntl
      pcre
      PDO
      pdo_mysql
      Phar
      posix
      Reflection
      session
      shmop
      SimpleXML
      soap
      sockets
      SPL
      standard
      sysvmsg
      sysvsem
      sysvshm
      tokenizer
      wddx
      xml
      xmlreader
      xmlwriter
      zip
      zlib

      [Zend Modules]
      [/CODE]

      Regards,
      Ch3i.

      posted in General
      ch3iC
      ch3i
    • RE: SVN 3183, PHP Warning: Module 'mysqlnd' already loaded in Unknown on line 0 errors when installing

      Hi,

      Just update to SVN 3200 : fixed.

      Regards,
      Ch3i.

      posted in Linux Problems
      ch3iC
      ch3i
    • RE: Failed to get new client version

      Hi,

      Follow that : [url]http://fogproject.org/forum/threads/svn-3192-hangs.12685/[/url]

      Regards,
      Ch3i.

      posted in FOG Problems
      ch3iC
      ch3i
    • RE: Error Code 1326

      [quote=“Tom Elliott, post: 44874, member: 7271”]The error code (1326) is specific to Microsoft domain joining specifically that the “username and password are incorrect”[/quote]

      +1.

      [CODE]Description Actual Error Error Code
      Bad credentials. ERROR_LOGON_FAILURE 1326[/CODE]

      Casey Ailiff, have you try with the default domain administrator account ?

      Regards,
      Ch3i.

      posted in FOG Problems
      ch3iC
      ch3i
    • RE: Fog problem with lenovo thinkcenter M73

      [quote=“Wayne Workman, post: 44879, member: 28155”]
      Also, what is the model of the problem Lenovo?[/quote]

      I think : Thinkcenter M73 😛

      Edit : The [B]M73z[/B] is in Working Devices of the wiki : [url]http://fogproject.org/wiki/index.php/WorkingDevices[/url]

      posted in FOG Problems
      ch3iC
      ch3i
    • RE: SVN 3183, PHP Warning: Module 'mysqlnd' already loaded in Unknown on line 0 errors when installing

      Hi,

      Same today with 3192 :

      [CODE] * Setting up and starting Apache Web Server…PHP Warning: Module ‘mysqlnd’ already loaded in Unknown on line 0
      OK

      • Changing permissions on apache log files…OK
      • Downloading kernels and inits…OK
      • Downloading New FOG Client file…PHP Warning: Module ‘mysqlnd’ already loaded in Unknown on line 0
        PHP Warning: Module ‘mysqlnd’ already loaded in Unknown on line 0[/CODE]

      Regards,
      Ch3i.

      Edit : “Solved” it with restarting mysql during installation of fog.

      posted in Linux Problems
      ch3iC
      ch3i
    • RE: SVN 3183, PHP Warning: Module 'mysqlnd' already loaded in Unknown on line 0 errors when installing

      Hi,

      With de 3188 I have the same problem :

      [CODE]PHP Warning: Module ‘mysqlnd’ already loaded in Unknown on line 0
      PHP Warning: Module ‘mysqlnd’ already loaded in Unknown on line 0
      PHP Warning: Module ‘mysqlnd’ already loaded in Unknown on line 0
      [/CODE]

      [CODE]root@SRV-FOG:~/svn/trunk# svnversion
      3188[/CODE]

      Regards,
      Ch3i.

      posted in Linux Problems
      ch3iC
      ch3i
    • RE: New Client 0 Bytes

      Hi,

      Updated to latest version and I haven’t the msi in the client folder.

      Regards,
      Ch3i.

      Edit : Solved using that : [url]http://fogproject.org/forum/threads/latest-development-fog.10556/page-28#post-44440[/url]

      posted in Bug Reports
      ch3iC
      ch3i
    • RE: New Client 0 Bytes

      I’ve just update my installation, now I have that :

      [CODE]-rw-r–r-- 1 www-data www-data 8717 mars 26 12:02 FOGCrypt.zip
      -rw-r–r-- 1 www-data www-data 4741 mars 26 12:02 FogPrep.zip
      -rw-r–r-- 1 www-data www-data 796658 mars 26 12:02 FogService.zip
      -rw-r–r-- 1 www-data www-data 291 mars 26 12:02 index.php
      [/CODE]

      posted in Bug Reports
      ch3iC
      ch3i
    • RE: New Client 0 Bytes

      [quote=“Tom Elliott, post: 44397, member: 7271”]Weird question, but maybe related. Those that are getting the 0 byte problem, are you using sudo ./installfog.sh?[/quote]

      I use the root account and Debian.

      posted in Bug Reports
      ch3iC
      ch3i
    • RE: New Client 0 Bytes

      Hi,

      I have the same problem :

      [CODE]-rw-r–r-- 1 www-data www-data 8,6K mars 25 13:59 FOGCrypt.zip
      -rw-r–r-- 1 www-data www-data 4,7K mars 25 13:59 FogPrep.zip
      -rw-r–r-- 1 root root 0 mars 25 14:00 FOGService.msi
      -rw-r–r-- 1 www-data www-data 778K mars 25 13:59 FogService.zip
      -rw-r–r-- 1 www-data www-data 291 mars 25 13:59 index.php
      [/CODE]

      Regards,
      Ch3i.

      posted in Bug Reports
      ch3iC
      ch3i
    • RE: Snapin Tools

      [quote=“Wayne Workman, post: 44000, member: 28155”][url]http://emcosoftware.com/msi-package-builder[/url]

      that’ll do it, but it’s not free. They have 3 different versions. The pro version will record all changes except for services and drivers. The enterprise version does everything.

      IMO, it’s not worth two cents unless you get the enterprise version. Their “Pro” version of the software used to deploy Java with custom settings has caused me nothing but nightmares.[/quote]

      Hi,

      Buy it and very usefull !

      Regards,
      Ch3i.

      posted in General
      ch3iC
      ch3i
    • RE: Extended partition image not uploading/downloading properly

      Hi,

      I had several issues with partitioning in multiboot configuration. Finally I solved it using a “standard” partitioning in ms dos partition table, using sda4 as the extended and no partition after.

      Now I used it :

      [CODE]/dev/sda1 – windows boot (ntfs)
      /dev/sda2 – windows system (ntfs)
      /dev/sda3 – linux / (ext4)
      /dev/sda4 – extended (-)
      /dev/sda5 – swap (-)
      /dev/sda6 – DATA (ntfs)[/CODE]

      Or that :
      [CODE]/dev/sda1 – windows boot (ntfs)
      /dev/sda2 – windows system (ntfs)
      /dev/sda3 – linux / (ext4)
      /dev/sda4 – extended (-)
      /dev/sda5 – swap (-)
      /dev/sda6 – DATA WIN (ntfs)
      /dev/sda7 – DATA LINUX (ext4)[/CODE]

      In the fstab I disabled the UUID and used names.

      Regards,
      Ch3i.

      posted in Bug Reports
      ch3iC
      ch3i
    • RE: [SOLVED] WOL not working since 1.2.0

      Hi,

      Could you PM me (I’m french)

      Regards,
      Ch3i.

      posted in FOG Problems
      ch3iC
      ch3i
    • RE: SVN 3080: NIC Registration

      [quote=“Uncle Frank, post: 43632, member: 28116”]sed, grep, tr and all the rest are very nice but we don’t really need them here, do we?
      [CODE]… cat /sys/class/net/[^l][^o]*/address …[/CODE]

      And still wondering about if ‘IFS’ is needed here. Sorry goto go now.[/quote]

      Very usefull, I’ll use in my script !

      posted in Bug Reports
      ch3iC
      ch3i
    • [SCRIPTS] Customization of Ubuntu - "Fog Service" for Ubuntu

      Hi,

      I made two scripts to customize a master and enabled a “Fog Service” in ubuntu.
      I used it in dual boot configuration (Win7/Ubuntu 14.04)

      The first script - Cutom_My_Master (only launch on the master to prepare image) :

      • Update host (apt-get update / upgrade)
      • Modify Grub : Set timeout to 30s and default boot
      • Modify Gnome authentication : Disable login history
      • Enable Fog Service : add a service that allow to modify hostname, domain at startup/shutdown
      • Display a cool Hello Kitty at end (It was to justify my daughter why I was working at home)

      The second script - host_rename_fog (it’s the “FOG client”) :

      • It’s installed as a service
      • Update hostname and domain by contacting Fog Mysql Server (at startup/shutdown)
        -> Detect all networks cards and check if a mac address is present in Fog. If the hostname or domain is different it apply the update
        ->Turn all interfaces in DHCP in /etc/network/interface
        -> Updating /etc/hosts and /etc/hostname
        -> Remove persistent cards, very usefull in deployment
        -> Automatically restart machine to apply modification, and modify default boot to ubuntu once time.

      Howto :
      1/ Copy paste the code below in two files (saved in the same folder) : Custom_My_Master (in my case) and rename_host_fog (the name is important for this file, it’s used to declare the script in the init process).
      2/ Change right of Custom_My_Master : chmod 755 Custom_My_Master
      3/ Modify the rename_host_fog to match with your fog installation
      4/ Run Custom_My_Master : ./Custom_My_Master

      Scripts :

      Custom_My_Master

      #!/bin/bash
      #########################################################
      # Configure Ubuntu in Dual Boot
      #########################################################
      # Ch3i- 02/19/2015
      #########################################################
      
      #########################################################
      # Functions
      #########################################################
      
      FUNC_END(){
      echo -e "\033[45m##########################################################################
      #                          Updates Finished                              #
      ##########################################################################"
      cat <<"EOT"
                                                                                
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!`   `4!!!!!!!!!!~4!!!!!!!!!!!!!!!!!
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!   <~:   ~!!!~   ..  4!!!!!!!!!!!!!!!
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  ~~~~~~~     ud$$$$$  !!!!!!!!!!!!!!!
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  ~~~~~~~~~: ?$$$$$$$$$  !!!!!!!!!!!!!!
      !!!!!!!!!!!`     ``~!!!!!!!!!!!!!!  ~~~~~           *$$$$$k `!!!!!!!!!!!!!
      !!!!!!!!!!  $$$$$bu.   ~!~`     .   ~~~~      :~~~~          `4!!!!!!!!!!!
      !!!!!!!!!  $$$$$$$$$$$c  .zW$$$$$E ~~~~      ~~~~~~~~  ~~~~~:   !!!!!!!!!!
      !!!!!!!!! d$$$$$$$$$$$$$$$$$$$$$$E ~~~~~     ~~~~~~~~    ~~~~~  !!!!!!!!!!
      !!!!!!!!> 9$$$$$$$$$$$$$$$$$$$$$$$  ~~~~~~~  ~~~~~~~~     ~~~~  !!!!!!!!!!
      !!!!!!!!> $$$$$$$$$$$$$$$$$$$$$$$$b   ~~~     ~~~~~~~      ~~~  !!!!!!!!!!
      !!!!!!!!> $$$$$$$$$$$$$$$$$$$$$$$$$$$cuuue$$N.   ~        ~~~  !!!!!!!!!!!
      !!!!!!!!! **$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$Ne  ~~~~~~~~  `!!!!!!!!!!!
      !!!!!!!!!  J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$N  ~~~~~  zL  !!!!!!!!!!
      !!!!!!!!  d$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$c     z$$$c `!!!!!!!!!
      !!!!!!!> <$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$> 4!!!!!!!!
      !!!!!!!  $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$  !!!!!!!!
      !!!!!!! <$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*    ....:!!
      !!!!!!~ 9$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$e@$N  !!!!!!!
      !!!!!!  9$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$  !!!!!!!
      !!!!!!  $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$  $$$$$$$$$$$~ ~~4!!!!
      !!!!!!  9$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$    $$$$$$$Lue  :::!!!!
      !!!!!!> 9$$$$$$$$$$$$   $$$$$$$$$$$$$$$$$$$$$$$$$$$    $$$$$$$$$$  !!!!!!!
      !!!!!!!  $$*$$$$$$$$E    $$$$$$$$$$$$$$$$$$$$$$$$$$$u.@$$$$$$$$$E  !!!!!!!
      !!!!~`   .eeW$$$$$$$$   :$$$$$$$$$$$$$***$$$$$$$$$$$$$$$$$$$$u.    `~!!!!!
      !!> .:!h  $$$$$$$$$$$$ed$$$$$$$$$$$$Fz$$b $$$$$$$$$$$$$$$$$$$$$F  !h.  !!!
      !!!!!!!!L  $**$$$$$$$$$$$$$$$$$$$$$$ *$$$ $$$$$$$$$$$$$$$$$$$$F  !!!!!!!!!
      !!!!!!!!!   d$$$$$$$$$$$$$$$$$$$$$$$$buud$$$$$$$$$$$$$$$$$$$$   !!!!!!!!!!
      !!!!!!! .<!  #$$* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*  :!!!!!!!!!!!
      !!!!!!!!!!!!:   d$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#  :!!!!!!!!!!!!!
      !!!!!!!!!!!~  :   #$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*     !!!!!!!!!!!!!!!
      !!!!!!!!!!  !!!!!:   ^ **$$$$$$$$$$$$$$$$$$$$**#      .:<!!!!!!!!!!!!!!!!!
      !!!!!!!!!!!!!!!!!!!!!:...                      .::!!!!!!!!!!!!!!!!!!!!!!!!
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                                                                                
      EOT
      echo -e "\033[0m\n\n"
      }
      
      FUNC_TOP(){
      echo -e "\033[42m#########################################################
      #         Custom My Master - New master deploy          #
      #########################################################\033[0m\n\n"
      
      if [ "$STATUS_UPDATE_UPDATE" == "1" ]
      then
      	echo -n "Update in progress...";
      fi
      if [ "$STATUS_UPDATE_UPDATE" == "2" ]
      then
      	echo "Update in progress... Done";
      fi
      
      if [ "$STATUS_UPDATE_GRUB" == "1" ]
      then
      	echo -n "Grub configuration in progress...";
      fi
      if [ "$STATUS_UPDATE_GRUB" == "2" ]
      then
      	echo "Grub configuration in progress... Done";
      fi
      
      if [ "$STATUS_UPDATE_GNOME" == "1" ]
      then
      	echo -n "Gnome configuration in progress...";
      fi
      if [ "$STATUS_UPDATE_GNOME" == "2" ]
      then
      	echo "Gnome configuration in progress... Done";
      fi
      
      if [ "$STATUS_UPDATE_FOG" == "1" ]
      then
      	echo -n "Fog Service configuration in progress...";
      fi
      if [ "$STATUS_UPDATE_FOG" == "2" ]
      then
      	echo "Fog Service configuration in progress... Done";
      fi
      }
      
      #########################################################
      # Vars initialization
      #########################################################
      STATUS_UPDATE_UPDATE=0
      STATUS_UPDATE_GRUB=0
      STATUS_UPDATE_GNOME=0
      STATUS_UPDATE_FOG=0
      
      #########################################################
      # Menu
      #########################################################
      clear
      
      FUNC_TOP
      
      echo -e "\033[42m1 - Host Update (apt-get update/upgrade) 
      2 - Grub Configuration                   
      3 - Gnome Authentication                 
      4 - Enable Fog Service                   
      5 - All                                  
      6 - Exit                                 \033[0m\n"
      echo -n "Your select : " 
      read -e HOST_ACTIONS
      
      
      #########################################################
      # Host Update
      #########################################################
      if [ "$HOST_ACTIONS" == "1" ] || [ "$HOST_ACTIONS" == "5" ]
      then
      	clear
      	STATUS_UPDATE_UPDATE=1
      	FUNC_TOP
      	
      	apt-get update > /dev/null 2>&1
      	apt-get -y upgrade  > /dev/null 2>&1
      	
      	clear
      	STATUS_UPDATE_UPDATE=2
      	FUNC_TOP
      fi
      
      
      #########################################################
      # Grub Configuration (Set default boot, timeout, ...)
      #########################################################
      if [ "$HOST_ACTIONS" == "2" ] || [ "$HOST_ACTIONS" == "5" ]
      then
      	#########################################################
      	# Update Grub Configuration (Grub 2.0+)
      	#########################################################
      	
      	clear
      	STATUS_UPDATE_GRUB=1
      	FUNC_TOP
      
      	# Enabled grub-set-default
      	sed -i -e "s/\GRUB_DEFAULT=0/\GRUB_DEFAULT=saved/g" /etc/default/grub
      
      	# Set timeout at 30 seconds
      	sed -i -e "s/\GRUB_TIMEOUT=10/\GRUB_TIMEOUT=30/g" /etc/default/grub
      
      	# Removed memtest from /boot
      	rm /boot/memtest*  > /dev/null 2>&1
      
      	# Update Entry
      	update-grub2  > /dev/null 2>&1
      
      	# Set default entry from Eric Zhiqiang Ma (http://www.ericzma.com)
      	grep "^menuentry" /boot/grub/grub.cfg | cut -d "'" -f2 >/tmp/grub2-select.entries
      
      	items=`cat /tmp/grub2-select.entries`
      
      	linen=`cat /tmp/grub2-select.entries | wc -l`
      	
      	echo "\n"
      	
      	j=0
      	while [ $j -lt $linen ]
      	do
      		let "j=j+1"
      		echo -n "$j  "
      		echo "$items" | head -n $j | tail -n1
      	done
      
      	echo -n -e "\nYour select: "
      	read sel
      
      	selected=`echo "$items" | head -n $sel | tail -n1`
      
      	grub-set-default "$selected"
      	grub-mkconfig -o /boot/grub/grub.cfg  > /dev/null 2>&1
      	
      	clear
      	STATUS_UPDATE_GRUB=2
      	FUNC_TOP
      fi
      
      
      
      #########################################################
      # Gnome Authentication (Disable login history)
      #########################################################
      if [ "$HOST_ACTIONS" == "3" ] || [ "$HOST_ACTIONS" == "5" ]
      then
      	#########################################################
      	# Update Gnome Authentication
      	#########################################################
      	
      	clear
      	STATUS_UPDATE_GNOME=1
      	FUNC_TOP
      	
      	echo "greeter-hide-users=true
      greeter-show-manual-login=true" >> /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
      
      	clear
      	STATUS_UPDATE_GNOME=2
      	FUNC_TOP
      	
      	fi
      
      #########################################################
      # Enable Fog Service
      #########################################################
      if [ "$HOST_ACTIONS" == "3" ] || [ "$HOST_ACTIONS" == "5" ]
      then
      	
      	clear
      	STATUS_UPDATE_FOG=1
      	FUNC_TOP
      	
      	#########################################################
      	# Install/update mysql-client
      	#########################################################
      	apt-get -y install mysql-client  > /dev/null 2>&1
      
      	#########################################################
      	# Copy/update rename_host_fog script in init.d
      	#########################################################
      	if [ -f /etc/init.d/rename_host_fog ]
      	then
      		rm /etc/init.d/rename_host_fog
      	fi
      	cp rename_host_fog /etc/init.d/rename_host_fog
      
      	#########################################################
      	# Update rename_host_fog rights
      	#########################################################
      	chmod 755 /etc/init.d/rename_host_fog
      
      	#########################################################
      	# Enable rename_host_fog service at startup
      	#########################################################
      	/usr/lib/insserv/insserv rename_host_fog
      	
      	clear
      	STATUS_UPDATE_FOG=2
      	FUNC_TOP
      	
      fi
      
      #########################################################
      # Restart host
      #########################################################
      if [ "$HOST_ACTIONS" == "1" ] || [ "$HOST_ACTIONS" == "2" ] || [ "$HOST_ACTIONS" == "3" ] || [ "$HOST_ACTIONS" == "4" ] || [ "$HOST_ACTIONS" == "5" ]
      then
      	
      	clear
      	FUNC_TOP
      	
      	echo -e "\n\n"
      	echo -e -n "\033[41mRestart host ? (y/N) : \033[0m"; read -e HOST_RESTART
      	
      	clear
      	FUNC_END
      	
      	if [ "$HOST_RESTART" == "y" ] || [ "$HOST_RESTART" == "Y" ]
      	then
      		sleep 3
      		grub-reboot 0
      		/sbin/init 6
      	fi
      else
      	clear
      	exit
      fi
      

      host_rename_fog

      #!/bin/bash
      #########################################################
      # Rename services with FoG, need mysql-client installed
      #########################################################
      # ch3i - 09/11/2015
      #########################################################
      
      ### BEGIN INIT INFO
      # Provides:          rename_host_fog
      # Required-Start:    $all
      # Required-Stop:     
      # Default-Start:     2 3 4 5
      # Default-Stop:      0 1 6
      # Short-Description: Rename host at boot-shutdown
      # Description:       Rename host using FoG
      ### END INIT INFO
      
      #########################################################
      # Functions
      #########################################################
      FUNC_DOTS() {
          max=65
          if [ -n "$1" ]; then
      		n=`expr $max - ${#1}`
      		echo -n " * ${1:0:max}"
      		if [ "$n" -gt 0 ]; then
      			for i in $(seq $n); do
      				printf %s .
      			done
      		fi
      	fi
      }
      
      #########################################################
      # Configuration
      #########################################################
      FOG_SERVER="server_ip"
      FOG_DATABASE_NAME="fog"
      FOG_USER="simple_select_user"
      FOG_PASSWORD="simple_select_user_password"
      
      #########################################################
      # Check Mysql Client installation
      #########################################################
      FUNC_DOTS "Check Mysql Configuration"
      if [ $(dpkg-query -W -f='${Status}' mysql-client* 2>/dev/null | grep -c "ok installed") -eq 0 ];
      then
        apt-get install -y mysql-client > /dev/null 2>&1
      fi
      echo "Done"
      
      #########################################################
      # Check Mysql Server status
      #########################################################
      FUNC_DOTS "Check FOG Mysql Database Status"
      mysqladmin -h $FOG_SERVER -u$FOG_USER -p$FOG_PASSWORD processlist > /dev/null 2>&1
      if [ $? -eq 1 ]
      then
      	echo "Error"
      	FUNC_DOTS "Failed to connect to server"
      	echo "Exiting"
      	sleep 3
      	exit
      else
      	echo "Done"
      	
      	#########################################################
      	# Get interfaces
      	#########################################################
      	NETWORK_CARDS=($(ls /sys/class/net | grep eth))
      
      	#########################################################
      	# Get host name and domain from FoG database
      	#########################################################
      	FUNC_DOTS "Checking hostname/domain configurations"
      	for ETH in ${NETWORK_CARDS[*]}
      	do
      			MAC=$(cat /sys/class/net/$ETH/address)
      			TEMP_HOST_NAME=$(mysql --host=$FOG_SERVER --user=$FOG_USER --password=$FOG_PASSWORD $FOG_DATABASE_NAME -se "SELECT hosts.hostname FROM hosts INNER JOIN hostMAC ON ( hosts.hostID = hostMAC.hmHostID ) WHERE hostMAC.hmMAC = '$MAC'");
      			if [ "$TEMP_HOST_NAME" != "" ]
      			then
      				HOST_NAME=$TEMP_HOST_NAME
      				HOST_DOMAIN_NAME=$(mysql --host=$FOG_SERVER --user=$FOG_USER --password=$FOG_PASSWORD $FOG_DATABASE_NAME -se "SELECT hosts.hostADDomain FROM hosts INNER JOIN hostMAC ON ( hosts.hostID = hostMAC.hmHostID ) WHERE hostMAC.hmMAC = '$MAC'")
      				echo "Done ($HOST_NAME.$HOST_DOMAIN_NAME)"
      				sleep 3
      				# A hostname is found - quit the loop
      				break
      			else
      				echo "Error"
      				FUNC_DOTS "Host not found in FOG database"
      				echo "exiting"
      				sleep 3
      				exit
      			fi
      	done
      
      	#########################################################
      	# Check host configuration
      	#########################################################
      	ACTUAL_FQDN=$(hostname --fqdn)
      	if [ "$HOST_NAME.$HOST_DOMAIN_NAME" != "$ACTUAL_FQDN" -a "$HOST_NAME" != "" -a "$HOST_DOMAIN_NAME" != "" ]
      	then
      	
      		#########################################################
      		# Update hostname file
      		#########################################################
      		FUNC_DOTS "Updating /etc/hostname"
      		echo $HOST_NAME >/etc/hostname
      		echo "Done"
      
      		#########################################################
      		# Update hosts file
      		#########################################################
      		FUNC_DOTS "Updating /etc/hosts"
      		echo "127.0.0.1       localhost" > /etc/hosts
      		echo "127.0.1.1       $HOST_NAME.$HOST_DOMAIN_NAME $HOST_NAME " >> /etc/hosts
      		echo "# The following lines are desirable for IPv6 capable hosts
      ::1     ip6-localhost ip6-loopback
      fe00::0 ip6-localnet
      ff00::0 ip6-mcastprefix
      ff02::1 ip6-allnodes
      ff02::2 ip6-allrouters
      ff02::3 ip6-allhosts" >> /etc/hosts
      		echo "Done"
      		
      		#########################################################
      		# Update interfaces file
      		#########################################################
      		FUNC_DOTS "Updating /etc/network/interfaces"
      		echo "# This file describes the network interfaces available on your system
      # and how to activate them. For more information, see interfaces(5).
      
      # The loopback network interface
      auto lo
      iface lo inet loopback" > /etc/network/interfaces
      
      		for ETH in ${NETWORK_CARDS[*]}
      		do
      			if [ "$ETH" != "lo" ]
      			then
      			echo "# $ETH Interface
      allow-hotplug $ETH
      iface $ETH inet dhcp" >> /etc/network/interfaces
      			fi
      		done
      		echo "Done"
      
      		#########################################################
      		# Clear persistent network cards
      		#########################################################
      		FUNC_DOTS "Clearing persistent networks cards"
      		if [ -f /etc/udev/rules.d/70-persistent-net.rules ]
      		then
      			rm /etc/udev/rules.d/70-persistent-net.rules
      		fi
      		echo "Done"
      
      		#########################################################
      		# Logs and Reboot machine
      		#########################################################
      		FUNC_DOTS "Building rename logs"
      		echo "$(date) ::: Update successful with Hostname : $HOST_NAME and Domain : $HOST_DOMAIN_NAME" >> /var/log/rename_host_fog.log
      		echo "Done"
      		grub-reboot 0
      		/sbin/init 6
      		exit		
      	fi
      	if [ "$HOST_NAME" == "" -a "$HOST_DOMAIN_NAME" == "" ]
      	then
      		echo "$(date) ::: Update failed : Failed to connect to Mysql Server" >> /var/log/rename_host_fog.log
      	fi
      	if [ "$HOST_NAME" != "" -a "$HOST_DOMAIN_NAME" == "" ]
      	then
      		echo "$(date) ::: Update failed : Domain name is missing" >> /var/log/rename_host_fog.log
      	fi
      fi
      exit
      

      host_rename_fog (without using of MySQL) :

      #!/bin/bash
      #########################################################
      # Rename services with FoG, need mysql-client installed
      #########################################################
      # ch3i - 09/11/2015
      #########################################################
      
      ### BEGIN INIT INFO
      # Provides:          rename_host_fog
      # Required-Start:    $all
      # Required-Stop:     
      # Default-Start:     2 3 4 5
      # Default-Stop:      0 1 6
      # Short-Description: Rename host at boot-shutdown
      # Description:       Rename host using FoG
      ### END INIT INFO
      
      #########################################################
      # Functions
      #########################################################
      FUNC_DOTS() {
          max=65
          if [ -n "$1" ]; then
      		n=`expr $max - ${#1}`
      		echo -n " * ${1:0:max}"
      		if [ "$n" -gt 0 ]; then
      			for i in $(seq $n); do
      				printf %s .
      			done
      		fi
      	fi
      }
      
      #########################################################
      # Configuration
      #########################################################
      FOG_SERVER="ip_of_server"
      FOG_WEBROOT="fog"
      
      #########################################################
      # Check FOG Server Status
      #########################################################
      FUNC_DOTS "Check FOG web service Status"
      wget "http://$FOG_SERVER/$FOG_WEBROOT/index.php" -t 1 2>/dev/null
      if [ $? -eq 0 ]
      then
      	echo "Done"
      	
      	#########################################################
      	# Get interfaces
      	#########################################################
      	NETWORK_CARDS=($(ls /sys/class/net | grep eth))
      
      	#########################################################
      	# Get host name and domain from FoG database
      	#########################################################
      	FUNC_DOTS "Checking hostname/domain configurations"
      	for ETH in ${NETWORK_CARDS[*]}
      	do
      			# read mac address
      			MAC=$(cat /sys/class/net/$ETH/address)
      			# get mac address information from fog web server
      			wget http://$FOG_SERVER/$FOG_WEBROOT/service/hostname.php?mac=$MAC -O /tmp/hostname_check 2>/dev/null
      			HOST_NAME="$(grep 'ok=' /tmp/hostname_check | cut -d "=" -f2)"
      			HOST_DOMAIN_NAME="$(grep 'ADDom' /tmp/hostname_check | cut -d "=" -f2)"
      			if [ "$HOST_NAME" != "" ]
      			then
      				echo "Done ($HOST_NAME.$HOST_DOMAIN_NAME)"
      				sleep 3
      				# A hostname is found - quit the loop
      				break
      			else
      				echo "Error"
      				FUNC_DOTS "Host not found in FOG database"
      				echo "exiting"
      				sleep 3
      				exit
      			fi
      	done
      
      	#########################################################
      	# Check host configuration
      	#########################################################
      	ACTUAL_FQDN=$(hostname --fqdn)
      	if [ "$HOST_NAME.$HOST_DOMAIN_NAME" != "$ACTUAL_FQDN" -a "$HOST_NAME" != "" -a "$HOST_DOMAIN_NAME" != "" ]
      	then
      	
      		#########################################################
      		# Update hostname file
      		#########################################################
      		FUNC_DOTS "Updating /etc/hostname"
      		echo $HOST_NAME >/etc/hostname
      		echo "Done"
      
      		#########################################################
      		# Update hosts file
      		#########################################################
      		FUNC_DOTS "Updating /etc/hosts"
      		echo "127.0.0.1       localhost" > /etc/hosts
      		echo "127.0.1.1       $HOST_NAME.$HOST_DOMAIN_NAME $HOST_NAME " >> /etc/hosts
      		echo "# The following lines are desirable for IPv6 capable hosts
      ::1     ip6-localhost ip6-loopback
      fe00::0 ip6-localnet
      ff00::0 ip6-mcastprefix
      ff02::1 ip6-allnodes
      ff02::2 ip6-allrouters
      ff02::3 ip6-allhosts" >> /etc/hosts
      		echo "Done"
      		
      		#########################################################
      		# Update interfaces file
      		#########################################################
      		FUNC_DOTS "Updating /etc/network/interfaces"
      		echo "# This file describes the network interfaces available on your system
      # and how to activate them. For more information, see interfaces(5).
      
      # The loopback network interface
      auto lo
      iface lo inet loopback" > /etc/network/interfaces
      
      		for ETH in ${NETWORK_CARDS[*]}
      		do
      			if [ "$ETH" != "lo" ]
      			then
      			echo "# $ETH Interface
      allow-hotplug $ETH
      iface $ETH inet dhcp" >> /etc/network/interfaces
      			fi
      		done
      		echo "Done"
      
      		#########################################################
      		# Clear persistent network cards
      		#########################################################
      		FUNC_DOTS "Clearing persistent networks cards"
      		if [ -f /etc/udev/rules.d/70-persistent-net.rules ]
      		then
      			rm /etc/udev/rules.d/70-persistent-net.rules
      		fi
      		echo "Done"
      
      		#########################################################
      		# Logs and Reboot machine
      		#########################################################
      		FUNC_DOTS "Building rename logs"
      		echo "$(date) ::: Update successful with Hostname : $HOST_NAME and Domain : $HOST_DOMAIN_NAME" >> /var/log/rename_host_fog.log
      		echo "Done"
      		grub-reboot 0
      		/sbin/init 6
      		exit		
      	fi
      	if [ "$HOST_NAME" == "" -a "$HOST_DOMAIN_NAME" == "" ]
      	then
      		echo "$(date) ::: Update failed : Failed to connect to Mysql Server" >> /var/log/rename_host_fog.log
      	fi
      	if [ "$HOST_NAME" != "" -a "$HOST_DOMAIN_NAME" == "" ]
      	then
      		echo "$(date) ::: Update failed : Domain name is missing" >> /var/log/rename_host_fog.log
      	fi
      else
      	echo "Error"
      	FUNC_DOTS "Failed to connect to server"
      	echo "Exiting"
      	sleep 3
      	exit
      fi
      exit
      
      posted in General
      ch3iC
      ch3i
    • RE: Hardware Currently Working with FOG v1.x.x

      Hi,

      New model tested :

      [CODE]HP Elite 7300 MT (Tower)[/CODE]

      Regards,
      Ch3i

      posted in Hardware Compatibility
      ch3iC
      ch3i
    • RE: SVN 2806 : Task Management

      Hi,

      After multiple SVN update, I’ve always the same problem.
      Try with another computer/tablet/navigator…

      Regards,
      Ch3i.

      posted in Bug Reports
      ch3iC
      ch3i
    • RE: Host custom attributes

      It’s seem to be OK, but no mass update with groups 😛

      posted in Feature Request
      ch3iC
      ch3i
    • 1 / 1