Statistics
| Branch: | Tag: | Revision:

root / snf-image-helper / tasks / 40AddDeleteUnattendScript.in @ f6e23601

History | View | Annotate | Download (672 Bytes)

1
#! /bin/bash
2

    
3
### BEGIN TASK INFO
4
# Provides:		AddDeleteUnattendScript
5
# RunBefore:		UmountImage
6
# RunAfter:		MountImage
7
# Short-Description:	Script that removes Unattend.xml after setup has finished
8
### END TASK INFO
9

    
10
set -e
11
. "@commondir@/common.sh"
12

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

    
17
if [ "$SNF_IMAGE_OS" = "windows" ]; then
18
    # Make sure Unattend.xml is removed after setup has finished
19
    mkdir -p "$SNF_IMAGE_TARGET/Windows/Setup/Scripts"
20
    echo "del /Q /F C:\Unattend.xml" > "$SNF_IMAGE_TARGET/Windows/Setup/Scripts/SetupComplete.cmd"
21
fi
22

    
23
exit 0
24

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