Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-image
Commits
5d3735b5
Commit
5d3735b5
authored
Sep 29, 2011
by
Nikos Skalkotos
Browse files
Make sure all tasks contail the vim config line
parent
630610f8
Changes
9
Hide whitespace changes
Inline
Side-by-side
helper/tasks/10ResizeUnmounted
View file @
5d3735b5
...
...
@@ -22,4 +22,5 @@ if [ "$SNF_IMAGE_TYPE" = "extdump" ]; then
fi
exit
0
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
helper/tasks/30MountImage
View file @
5d3735b5
...
...
@@ -20,4 +20,5 @@ fi
mount
$SNF_IMAGE_DEV
$SNF_IMAGE_TARGET
exit
0
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
helper/tasks/40AddDeleteUnattendScript
View file @
5d3735b5
...
...
@@ -14,15 +14,12 @@ if [ ! -d "$SNF_IMAGE_TARGET" ]; then
log_error
"Target dir:
\`
$SNF_IMAGE_TARGET
' is missing"
fi
if
[
"
$SNF_IMAGE_TYPE
"
!=
"ntfsdump"
]
;
then
exit
0
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:
\U
nattend.xml"
>
"
$SNF_IMAGE_TARGET
/Windows/Setup/Scripts/SetupComplete.cmd"
fi
# Make sure Unattend.xml is removed after setup has finished
mkdir
-p
"
$SNF_IMAGE_TARGET
/Windows/Setup/Scripts"
echo
"del /Q /F C:
\U
nattend.xml"
>
"
$SNF_IMAGE_TARGET
/Windows/Setup/Scripts/SetupComplete.cmd"
exit
0
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
helper/tasks/40DeleteSSHKeys
View file @
5d3735b5
...
...
@@ -13,24 +13,21 @@ if [ ! -d "$SNF_IMAGE_TARGET" ]; then
log_error
"Target dir:
\`
$SNF_IMAGE_TARGET
' is missing."
fi
if
[
"
$SNF_IMAGE_TYPE
"
!=
"extdump"
]
;
then
exit
0
if
[
"
$SNF_IMAGE_TYPE
"
=
"extdump"
]
;
then
HOST_KEY
=
"/etc/ssh/ssh_host_key"
RSA_KEY
=
"/etc/ssh/ssh_host_rsa_key"
DSA_KEY
=
"/etc/ssh/ssh_host_dsa_key"
for
key
in
$HOST_KEY
$RSA_KEY
$DSA_KEY
;
do
if
[
-f
"
${
SNF_IMAGE_TARGET
}
/
${
key
}
"
]
;
then
rm
-f
${
SNF_IMAGE_TARGET
}
/
${
key
}*
fi
done
fi
HOST_KEY
=
"/etc/ssh/ssh_host_key"
RSA_KEY
=
"/etc/ssh/ssh_host_rsa_key"
DSA_KEY
=
"/etc/ssh/ssh_host_dsa_key"
for
key
in
$HOST_KEY
$RSA_KEY
$DSA_KEY
;
do
if
[
-f
"
${
SNF_IMAGE_TARGET
}
/
${
key
}
"
]
;
then
rm
-f
${
SNF_IMAGE_TARGET
}
/
${
key
}*
fi
done
cleanup
trap
- EXIT
exit
0
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
helper/tasks/40InstallUnattend
View file @
5d3735b5
...
...
@@ -23,3 +23,5 @@ if [ -e /usr/share/snf-image/unattend.xml ]; then
fi
exit
0
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
helper/tasks/40ResizeMounted
View file @
5d3735b5
...
...
@@ -14,15 +14,17 @@ if [ ! -d "$SNF_IMAGE_TARGET" ]; then
log_error
"Target directory
\`
$SNF_IMAGE_TARGET
' is missing"
fi
# Write a diskpart script to %SystemDrive%\Windows\SnfScripts. Sysprep will
# try to execute this script during the specialize pass.
mkdir
-p
"
$SNF_IMAGE_TARGET
/Windows/SnfScripts"
cat
>
"
$SNF_IMAGE_TARGET
/Windows/SnfScripts/ExtendFilesystem"
<<
EOF
if
[
"
$SNF_IMAGE_TYPE
"
=
"ntfsdump"
]
;
then
# Write a diskpart script to %SystemDrive%\Windows\SnfScripts. Sysprep will
# try to execute this script during the specialize pass.
mkdir
-p
"
$SNF_IMAGE_TARGET
/Windows/SnfScripts"
cat
>
"
$SNF_IMAGE_TARGET
/Windows/SnfScripts/ExtendFilesystem"
<<
EOF
select disk 0
select volume 1
extend filesystem
exit
EOF
fi
cleanup
trap
- EXIT
...
...
@@ -30,4 +32,3 @@ trap - EXIT
exit
0
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
helper/tasks/40SELinuxAutorelabel
View file @
5d3735b5
...
...
@@ -14,17 +14,15 @@ if [ ! -d "$SNF_IMAGE_TARGET" ]; then
log_error
"Target dir:
\`
$SNF_IMAGE_TARGET
' is missing"
fi
if
[
"
$SNF_IMAGE_TYPE
"
!=
"extdump"
]
;
then
exit
0
fi
distro
=
$(
get_base_distro
$SNF_IMAGE_TARGET
)
if
[
"
$distro
"
=
"redhat"
]
;
then
# we have to force a filesystem relabeling for SELinux after messing
# around with the filesystem in redhat derived OSs
echo
"Enforce an automatic relabeling in the initial boot process..."
touch
$SNF_IMAGE_TARGET
/.autorelabel
if
[
"
$SNF_IMAGE_TYPE
"
=
"extdump"
]
;
then
distro
=
$(
get_base_distro
$SNF_IMAGE_TARGET
)
if
[
"
$distro
"
=
"redhat"
]
;
then
# we have to force a filesystem relabeling for SELinux after messing
# around with the filesystem in redhat derived OSs
echo
"Enforce an automatic relabeling in the initial boot process..."
touch
$SNF_IMAGE_TARGET
/.autorelabel
fi
fi
exit
0
...
...
helper/tasks/50AssignHostname
View file @
5d3735b5
...
...
@@ -68,8 +68,6 @@ elif [ "$SNF_IMAGE_TYPE" = "extdump" ]; then
linux_hostname
$SNF_IMAGE_TARGET
$SNF_IMAGE_HOSTNAME
fi
echo
"done"
cleanup
trap
- EXIT
...
...
helper/tasks/80UmountImage
View file @
5d3735b5
...
...
@@ -16,4 +16,10 @@ fi
umount
$SNF_IMAGE_TARGET
cleanup
trap
- EXIT
exit
0
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment