summaryrefslogtreecommitdiff
path: root/adapt-ks-template
diff options
context:
space:
mode:
Diffstat (limited to 'adapt-ks-template')
-rwxr-xr-xadapt-ks-template10
1 files changed, 10 insertions, 0 deletions
diff --git a/adapt-ks-template b/adapt-ks-template
index 8661a86..afc31e3 100755
--- a/adapt-ks-template
+++ b/adapt-ks-template
@@ -116,6 +116,10 @@ function parse_commadline {
KrnlCmdLineOpt="$(echo ${2} | sed -e 's/;/ /g')"
shift
;;
+ --gen-cmd)
+ GeneratorCommand="$(echo ${2} | sed -e 's/;:;/ /g')"
+ shift
+ ;;
*)
echo "what do you mean \"$1\"?"
exit 1
@@ -200,6 +204,12 @@ then
exit 1
fi
+# boilerplate:
+sed -ie '1 a #' "${TmpDir}/ks-template"
+sed -ie '2 a # This file generated with this command:' "${TmpDir}/ks-template"
+sed -ie "3 a # ${GeneratorCommand}" "${TmpDir}/ks-template"
+sed -ie '4 a #' "${TmpDir}/ks-template"
+
# substitutions:
sed -ie "s/HOSTNAME/${Host}/g" "${TmpDir}/ks-template"
sed -ie "s/DOMAIN/${Domain}/g" "${TmpDir}/ks-template"