Revision 6196f457 snf-image-helper/tasks/40InstallUnattend.in
b/snf-image-helper/tasks/40InstallUnattend.in | ||
---|---|---|
18 | 18 |
exit 0 |
19 | 19 |
fi |
20 | 20 |
|
21 |
if [ -f "@commondir@/unattend.xml" ]; then |
|
22 |
cat "@commondir@/unattend.xml" > "$SNF_IMAGE_TARGET/Unattend.xml" |
|
23 |
else |
|
21 |
if [ ! -f "@commondir@/unattend.xml" ]; then |
|
24 | 22 |
log_error "File \`@commondir@/unattend.xml' is missing." |
25 | 23 |
fi |
26 | 24 |
|
25 |
target=$SNF_IMAGE_TARGET |
|
26 |
mkdir -p "$target/Windows/Setup/Scripts" |
|
27 |
|
|
28 |
cat "@commondir@/unattend.xml" > "$target/Unattend.xml" |
|
29 |
echo "del /Q /F C:\Unattend.xml" > \ |
|
30 |
"$target/Windows/Setup/Scripts/SetupComplete.cmd" |
|
31 |
|
|
32 |
mkdir -p "$target/Windows/SnfScripts" |
|
33 |
|
|
34 |
echo "exit" > "$target/Windows/SnfScripts/ExtendFilesystem" |
|
35 |
echo "del /Q /F C:\Windows\SnfScripts\ExtendFilesystem" >> \ |
|
36 |
"$target/Windows/Setup/Scripts/SetupComplete.cmd" |
|
37 |
|
|
38 |
echo "@echo off" > "$target/Windows/SnfScripts/ChangeAdminPassword.cmd" |
|
39 |
# For security reasons, overwrite the file before deleting... |
|
40 |
spaces=$(printf "%200s"); |
|
41 |
echo "echo ${spaces// /X} > C:\Windows\SnfScripts\ChangeAdminPassword.cmd" >> \ |
|
42 |
"$target/Windows/Setup/Scripts/SetupComplete.cmd" |
|
43 |
echo "del /Q /F C:\Windows\SnfScripts\ChangeAdminPassword.cmd" >> \ |
|
44 |
"$target/Windows/Setup/Scripts/SetupComplete.cmd" |
|
45 |
|
|
46 |
echo "rmdir C:\Windows\SnfScripts" >> \ |
|
47 |
"$target/Windows/Setup/Scripts/SetupComplete.cmd" |
|
48 |
|
|
27 | 49 |
exit 0 |
28 | 50 |
|
29 | 51 |
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai : |
Also available in: Unified diff