@Tom-Elliott i’ve tried this fog.custominstall
Create the following file named fog.custominstall in the following path on the FOG server /images/postdownloadscripts.
Copy the content into that newly created file
#!/bin/bash
. /usr/share/fog/lib/funcs.sh
[[ -z $postdownpath ]] && postdownpath=“/images/postdownloadscripts/”
case $osid in
5|6|7|9)
clear
[[ ! -d /ntfs ]] && mkdir -p /ntfs
getHardDisk
if [[ -z $hd ]]; then
handleError “Could not find hdd to use”
fi
getPartitions $hd
for part in $parts; do
umount /ntfs >/dev/null 2>&1
fsTypeSetting “$part”
case $fstype in
ntfs)
dots “Testing partition $part”
ntfs-3g -o force,rw $part /ntfs
ntfsstatus=“$?”
if [[ ! $ntfsstatus -eq 0 ]]; then
echo “Skipped”
continue
fi
if [[ ! -d /ntfs/windows && ! -d /ntfs/Windows && ! -d /ntfs/WINDOWS ]]; then
echo “Not found”
umount /ntfs >/dev/null 2>&1
continue
fi
echo “Success”
break
;;
)
echo " * Partition $part not NTFS filesystem"
;;
esac
done
if [[ ! $ntfsstatus -eq 0 ]]; then
echo “Failed”
debugPause
handleError "Failed to mount $part ($0)\n Args: $"
fi
echo “Done”
debugPause
. ${postdownpath}fog.copydrivers
# . ${postdownpath}fog.updateunattend
umount /ntfs
;;
*)
echo “Non-Windows Deployment”
debugPause
return
;;
esac
Save and exit your text editor.
Make the script executable with chmod 755 /images/postdownloadscripts/fog.custominstall **this part i get chmod: cannot * chmod 755 ‘/images/postdownloadscripts/fog.custominstall’ :No such file or directory please help!!!
fog.copydrivers
Create the following file named fog.copydrivers in the following path on the FOG server /images/postdownloadscripts.
Copy the content into that newly created file
#!/bin/bash
ceol=tput el;
manu=dmidecode -s system-manufacturer;
dots “Identifying hardware”
case $manu in
[Ll][Ee][Nn][Oo][Vv][Oo])
machine=$(dmidecode -s system-version)
;;
[Dd][Ee][Ll][Ll])
machine=$(dmidecode -s system-product-name)
;;
I[Nn][Tt][Ee][Ll])
# For the Intel NUC and intel mobo pick up the system type from the
# baseboard product name
machine=$(dmidecode -s baseboard-product-name)
;;
*)
# Technically, we can remove the Dell entry above as it is the same as this [default]
machine=$(dmidecode -s system-product-name)
;;
esac
if [[ -z $machine ]]; then
echo “Unable to identify the hardware for manufacturer ${manu}”;
debugPause;
return;
fi
echo “${machine} Identified”;
machine=“${machine//[[:space:]]/}”
dots “Verifying we’ve found the OS disk”
if [[ ! -d /ntfs/windows && ! -d /ntfs/Windows && ! -d /ntfs/WINDOWS ]]; then
echo “! OS root Not found !”;
debugPause
return;
fi
echo “Found”;
dots “Verifying target Arch”
system64=“/ntfs/Windows/SysWOW64/regedit.exe”
[[ ! -f $system64 ]] && arch=“x86” || arch=“x64”
echo “${arch} found”;
debugPause
set osn path names based on the osid set in the FOG WebGuicase $osid in
5) osn=“win7” ;;
6) osn=“win8” ;;
7) osn=“win8.1” ;;
9) osn=“win10” ;;
esac
dots “Preparing Drivers”
clientdriverpath=“/ntfs/Drivers”
remotedriverpath=“/images/drivers/$machine/$osn/$arch”
debugPause
if [[ ! -d “${remotedriverpath}” ]]; then
echo “failed”;
echo " ! Driver package not found for ${machine}/$osn/$arch ! ";
debugPause;
return;
fi
echo “Ready”;
debugPause
[[ ! -d $clientdriverpath ]] && mkdir -p “$clientdriverpath” >/dev/null 2>&1
echo -n “In Progress”
rsync -aqz “$remotedriverpath” “$clientdriverpath” >/dev/null 2>&1
[[ ! $? -eq 0 ]] && handleError “Failed to download driver information for [$machine/$osn/$arch]”
debugPause