diff options
Diffstat (limited to 'adapt-ks-template')
-rwxr-xr-x | adapt-ks-template | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/adapt-ks-template b/adapt-ks-template index 6514745..39fc977 100755 --- a/adapt-ks-template +++ b/adapt-ks-template @@ -29,6 +29,8 @@ Options: -M, --netmask Netmask of target system -N, --nameserver Nameserver of target system -P, --publish-path Path where results will be stored + --boot-dev device to install bootloader on + --root-dev device to use for system --cosmos-tag Tag in ndn-sysconf to reference --template Template to use. This is a relative path, plus the name of the template file. Default: @@ -97,6 +99,14 @@ function parse_commadline { Kserver="$2" shift ;; + --boot-dev) + BootDev="${2}" + shift + ;; + --root-dev) + RootDev="${2}" + shift + ;; --cosmos-tag) CosmosTag="${2}" shift @@ -185,6 +195,22 @@ function check_options { then NS="109.105.96.141" fi + if [ "x${BootDev}" = "x" ] + then + BootDev="sda" + fi + if [ "x${RootDev}" = "x" ] + then + RootDev="sda" + fi + if [ "${RootDev}" = "${BootDev}" ] + then + UseDisk="${RootDev}" + ClearPart="${RootDev}" + else + UseDisk="${BootDev},${RootDev}" + ClearPart="${BootDev},${RootDev}" + fi } parse_commadline ${@} @@ -227,6 +253,9 @@ 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/${KrnlCmdLineOpt}/g" "${TmpDir}/ks-template" +sed -ie "s/BOOTDEV/${BootDev}/g" "${TmpDir}/ks-template" +sed -ie "s/CLEARPART/${ClearPart}/g" "${TmpDir}/ks-template" +sed -ie "s/USEDISK/${UseDisk}/g" "${TmpDir}/ks-template" if [ "x${PublishPath}" = "x" ] then |