diff options
Diffstat (limited to 'adapt-ks-template')
-rwxr-xr-x | adapt-ks-template | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/adapt-ks-template b/adapt-ks-template index 39fc977..e8f1eca 100755 --- a/adapt-ks-template +++ b/adapt-ks-template @@ -39,6 +39,7 @@ Options: --krnl-cmdline add stuff to destination system kernel cmdline --sec-ip IP of secondary interface --sec-nm Netmask of secondary interface + --sec-gw Gateway of secondary interface To avoid shell interpretation of whitespace in --krnl-cmdline use escaped semicolon: @@ -123,6 +124,10 @@ function parse_commadline { SecNM="${2}" shift ;; + --sec-gw) + SecGW="${2}" + shift + ;; -T|--tmp-dir) TmpDir="${2}" shift @@ -187,6 +192,12 @@ function check_options { print_usage exit 1 fi + if [ "x${SecGW}" = "x" ] + then + echo "${Self}: --sec-gw is mandatory" + print_usage + exit 1 + fi if [ "x${Kserver}" = "x" ] then Kserver="109.105.122.84" @@ -252,6 +263,7 @@ 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/SECGATEWAY/${SecGW}/g" "${TmpDir}/ks-template" sed -ie "s/KRNLCMDLINE/${KrnlCmdLineOpt}/g" "${TmpDir}/ks-template" sed -ie "s/BOOTDEV/${BootDev}/g" "${TmpDir}/ks-template" sed -ie "s/CLEARPART/${ClearPart}/g" "${TmpDir}/ks-template" |