Skip to content
Snippets Groups Projects
  • Nikos Skalkotos's avatar
    Mass cleanup and some bug fixing · bad5ca1f
    Nikos Skalkotos authored
     * Make all "local" variables lowercase.
     * Move HELPER_EXTRA_PKGS from snf-image-update-helper to common.sh
     * Protect all variables from spaces and other special chars
     * Remove extra X's from mktemp template names (only 6 are supported).
     * Make sure pipelines fail if any command (not only the rightmost)
       fails
    bad5ca1f
40AddDeleteUnattendScript.in 675 B
#! /bin/bash

### BEGIN TASK INFO
# Provides:		AddDeleteUnattendScript
# RunBefore:		UmountImage
# RunAfter:		MountImage
# Short-Description:	Script that removes Unattend.xml after setup has finished
### END TAST INFO

set -e
. "@commondir@/common.sh"

if [ ! -d "$SNF_IMAGE_TARGET" ]; then
	log_error "Target dir: \`$SNF_IMAGE_TARGET' is missing"	
fi

if [ "$SNF_IMAGE_TYPE" = "ntfsdump" ]; then
    # Make sure Unattend.xml is removed after setup has finished
    mkdir -p "$SNF_IMAGE_TARGET/Windows/Setup/Scripts"
    echo "del /Q /F C:\Unattend.xml" > "$SNF_IMAGE_TARGET/Windows/Setup/Scripts/SetupComplete.cmd"
fi

exit 0

# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :