From a055b0bb2824b95017c6a4eb5fa75e76f29bce99 Mon Sep 17 00:00:00 2001 From: Jon Clausen Date: Tue, 31 Jul 2018 15:47:21 +0200 Subject: use escaped semicolon for kernel cmdline whitespace substitution --- adapt-ks-template | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'adapt-ks-template') 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 -- cgit v1.1