summaryrefslogtreecommitdiff
path: root/adapt-ks-template
diff options
context:
space:
mode:
Diffstat (limited to 'adapt-ks-template')
-rwxr-xr-xadapt-ks-template22
1 files changed, 21 insertions, 1 deletions
diff --git a/adapt-ks-template b/adapt-ks-template
index 9f7640f..a2026e6 100755
--- a/adapt-ks-template
+++ b/adapt-ks-template
@@ -32,9 +32,11 @@ Options:
--template Template to use. This is a relative path, plus the
name of the template file. Default:
${Template}
+ -h, --help this
--sec-ip IP of secondary interface
--sec-nm Netmask of secondary interface
- -h, --help this
+ --tty console number
+ --ttyS serial console number
EOF
}
@@ -105,6 +107,14 @@ function parse_commadline {
TmpDir="${2}"
shift
;;
+ --tty)
+ tty="${2}"
+ shift
+ ;;
+ --ttyS)
+ ttyS="${2}"
+ shift
+ ;;
*)
echo "what do you mean \"$1\"?"
exit 1
@@ -165,6 +175,14 @@ function check_options {
then
NS="109.106.96.141"
fi
+ if [ "x${tty}" = "x" ]
+ then
+ tty=1
+ fi
+ if [ "x${ttyS}" = "x" ]
+ then
+ ttyS=1
+ fi
}
parse_commadline ${@}
@@ -198,6 +216,8 @@ sed -ie "s/PRIGATEWAY/${GW}/g" "${TmpDir}/ks-template"
sed -ie "s/PRINAMESERVERS/${NS}/g" "${TmpDir}/ks-template"
sed -ie "s/SECIP/${SecIP}/g" "${TmpDir}/ks-template"
sed -ie "s/SECNETMASK/${SecNM}/g" "${TmpDir}/ks-template"
+sed -ie "s/ttyTTY/tty${tty}/g" "${TmpDir}/ks-template"
+sed -ie "s/ttySTTYS/ttyS${ttyS}/g" "${TmpDir}/ks-template"
if [ "x${PublishPath}" = "x" ]
then