root / helper / tasks / 40AddDeleteUnattendScript.sh @ 0a35a4ab
History | View | Annotate | Download (657 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 TAST INFO |
9 |
|
10 |
set -e |
11 |
. /usr/share/snf-image/common.sh |
12 |
|
13 |
if [ -z "$SNF_IMAGE_TARGET" ]; then |
14 |
log_error "Target dir is missing" |
15 |
fi |
16 |
|
17 |
if [ "$SNF_IMAGE_TYPE" != "ntfsdump" ]; then |
18 |
exit 0 |
19 |
fi |
20 |
|
21 |
# Make sure Unattend.xml is removed after setup has finished |
22 |
mkdir -p "$SNF_IMAGE_TARGET/Windows/Setup/Scripts" |
23 |
echo "del /Q /F C:\Unattend.xml" > "$SNF_IMAGE_TARGET/Windows/Setup/Scripts/SetupComplete.cmd" |
24 |
|
25 |
exit 0 |
26 |
|
27 |
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai : |
28 |
|