diff options
| author | Jon Clausen <jac@nordu.net> | 2018-09-04 09:28:44 +0200 |
|---|---|---|
| committer | Jon Clausen <jac@nordu.net> | 2018-09-04 09:28:44 +0200 |
| commit | 43a34e6a6d2ff59f677019b2df6ae1d82895f838 (patch) | |
| tree | c6c270389ba220d9578b2c13d8b35df56a25a73a /adapt-ks-template | |
| parent | d6563d0c367d0a58f4551b18e66261670c8c5b6d (diff) | |
support for secondary GW, and route+rule on sec interface
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" |
