21H1 imaging issue-variables do not populate
-
Everything has worked for me in 1909, 1903, 1809, etc, etc.
I tried in 20H (gave up) and now 21H and my post imaging scripts (found in the forums) no longer work.
My variables don’t seem to get populated.
For example if I type
echo $machine
from a debug session, it provides no output
If I type dmidecode -s system-product-name from a debug session, I get the model name as expected.
Entire script below.
#!/bin/bash ceol=`tput el`; machine=$(dmidecode -s system-product-name) # Detect System Architecture system64="/ntfs/Windows/SysWOW64/regedit.exe" # sloppy detect if 64bit or not #[[ ! -f $system64 ]] && arch="x86" || arch="x64" [[ ! -f $system64 ]] && arch="x64" || arch="x64" # Detect Operating System case $osid in 5) osn="win7" ;; 6) osn="win8" ;; 7) osn="win8.1" ;; 9) osn="win10" ;; esac dots "Copying Drivers" # Create Driver Store and Copy Drivers clientdriverpath="/ntfs/Drivers" remotedriverpath="/images/drivers/$machine/$osn/$arch" [[ ! -d $clientdriverpath ]] && mkdir -p "$clientdriverpath" >/dev/null 2>&1 echo "In Progress" rsync -avz "$remotedriverpath/" "$clientdriverpath" >/dev/null 2>&1 [[ ! $? -eq 0 ]] && handleError "Failed to download driver information for [$machine/$osn/$arch]" regfile="/ntfs/Windows/System32/config/SOFTWARE" key="\Microsoft\Windows\CurrentVersion\DevicePath" devpath="%SystemRoot%\DRV;%SystemRoot%\inf;"; reged -e "$regfile" &>/dev/null <<EOFREG ed $key $devpath q y EOFREG echo -e "\b\b\b\b\b\b\b\b\b\b\b${ceol}Done"; # this just removes "In Progress and replaces it with done :-)"
Screenshot from 2021-07-16 18-15-17.png
-
@bruce-stewart The postinstall scripts execute under FOS Linux bash shell. FOS Linux doesn’t know/care about the target computer’s OS. When the script runs windows is not involved. So it kind of makes me think the issue is elsewhere.
Are you using these instructions for the postinstall script? https://forums.fogproject.org/topic/11126/using-fog-postinstall-scripts-for-windows-driver-injection-2017-ed
-
@george1421 yes for the post install.
-
@bruce-stewart said in 21H1 imaging issue-variables do not populate:
My variables don’t seem to get populated.
Well that’s pretty normal when you don’t use bash command
export
to make those available globally.