Auto-patch Blancco config.img for network report storage
After extracting Blancco from ISO, automatically patches preferences.xml to save erasure reports to \\10.9.100.1\blancco-reports via SMB. Sets auto_backup=true so reports save without user intervention. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -104,6 +104,28 @@ if [ -n "$BLANCCO_ISO" ] && [ -f "$BLANCCO_ISO" ]; then
|
||||
mkdir -p "$OUT_DIR/blancco/arch/x86_64"
|
||||
cp "$TMPDIR/arch/x86_64/airootfs.sfs" "$OUT_DIR/blancco/arch/x86_64/"
|
||||
echo " Extracted Blancco boot files."
|
||||
|
||||
# Patch config.img to auto-save reports to PXE server Samba share
|
||||
if [ -f "$OUT_DIR/blancco/config.img" ]; then
|
||||
echo " Patching config.img for network report storage..."
|
||||
CFGTMP=$(mktemp -d)
|
||||
cd "$CFGTMP"
|
||||
cpio -id < "$OUT_DIR/blancco/config.img" 2>/dev/null
|
||||
|
||||
if [ -f "$CFGTMP/preferences.xml" ]; then
|
||||
# Set network share to PXE server's blancco-reports Samba share
|
||||
sed -i 's|<hostname></hostname>|<hostname>10.9.100.1</hostname>|' "$CFGTMP/preferences.xml"
|
||||
sed -i 's|<path></path>|<path>blancco-reports</path>|' "$CFGTMP/preferences.xml"
|
||||
# Enable auto-backup of reports to the network share
|
||||
sed -i 's|<auto_backup>false</auto_backup>|<auto_backup>true</auto_backup>|' "$CFGTMP/preferences.xml"
|
||||
|
||||
# Repack config.img
|
||||
ls -1 | cpio -o -H newc > "$OUT_DIR/blancco/config.img" 2>/dev/null
|
||||
echo " Reports will auto-save to \\\\10.9.100.1\\blancco-reports"
|
||||
fi
|
||||
cd "$SCRIPT_DIR"
|
||||
rm -rf "$CFGTMP"
|
||||
fi
|
||||
else
|
||||
echo " Could not extract boot files from ISO."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user