diff options
author | Jon Clausen <jac@nordu.net> | 2018-07-31 15:47:21 +0200 |
---|---|---|
committer | Jon Clausen <jac@nordu.net> | 2018-07-31 15:47:21 +0200 |
commit | a055b0bb2824b95017c6a4eb5fa75e76f29bce99 (patch) | |
tree | c0e1c3491873295b6a874cdec93b23f8ae54d451 /adapt-ks-template | |
parent | 8673d6306458fb82e5160032f731f4c83b41c325 (diff) |
use escaped semicolon for kernel cmdline whitespace substitution
Diffstat (limited to 'adapt-ks-template')
-rwxr-xr-x | adapt-ks-template | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/adapt-ks-template b/adapt-ks-template index 3e3e20a..5dcbee7 100755 --- a/adapt-ks-template +++ b/adapt-ks-template @@ -37,6 +37,12 @@ Options: --sec-ip IP of secondary interface --sec-nm Netmask of secondary interface +To avoid shell interpretation of whitespace in --krnl-cmdline use escaped +semicolon: + To achieve this: + console=tty1 console=ttyS0,115200n8 + write this: + console=tty1\;console=ttyS0,115200n8 EOF } @@ -107,7 +113,7 @@ function parse_commadline { shift ;; --krnl-cmdline) - KrnlCmdLine="${2}" + KrnlCmdLineOpt="--krnl-cmdline $(echo ${2} | sed -e 's/;/ /g')" shift ;; *) @@ -203,7 +209,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/KRNLCMDLINE/${KrnlCmdLine}/g" "${TmpDir}/ks-template" +sed -ie "s/KRNLCMDLINE/${KrnlCmdLineOpt}/g" "${TmpDir}/ks-template" if [ "x${PublishPath}" = "x" ] then |