From 0d6171c69bbfd6af35fdc3c2affb1a721f54e2f6 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 12 Jul 2011 14:15:39 +0200 Subject: [PATCH] start work on cinst partitioning Signed-off-by: Steven Armstrong --- .../__cinst_partition_msdos/gencode-remote | 20 ++++++ conf/type/__cinst_partition_msdos/man.text | 63 +++++++++++++++++++ conf/type/__cinst_partition_msdos/manifest | 25 ++++++++ .../parameter/optional | 3 + .../parameter/required | 1 + 5 files changed, 112 insertions(+) create mode 100755 conf/type/__cinst_partition_msdos/gencode-remote create mode 100644 conf/type/__cinst_partition_msdos/man.text create mode 100755 conf/type/__cinst_partition_msdos/manifest create mode 100644 conf/type/__cinst_partition_msdos/parameter/optional create mode 100644 conf/type/__cinst_partition_msdos/parameter/required diff --git a/conf/type/__cinst_partition_msdos/gencode-remote b/conf/type/__cinst_partition_msdos/gencode-remote new file mode 100755 index 00000000..211bc1db --- /dev/null +++ b/conf/type/__cinst_partition_msdos/gencode-remote @@ -0,0 +1,20 @@ +#!/bin/sh +# +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# + diff --git a/conf/type/__cinst_partition_msdos/man.text b/conf/type/__cinst_partition_msdos/man.text new file mode 100644 index 00000000..2203c2d3 --- /dev/null +++ b/conf/type/__cinst_partition_msdos/man.text @@ -0,0 +1,63 @@ +cdist-type__cinst_partition_msdos(7) +==================================== +Steven Armstrong + + +NAME +---- +cdist-type__cinst_partition_msdos - creates msdos partitions + + +DESCRIPTION +----------- +This cdist type allows you to create msdos paritions. + + +REQUIRED PARAMETERS +------------------- +type:: + the partition type used in fdisk (such as 82 or 83) or "extended" + + +OPTIONAL PARAMETERS +------------------- +device:: + defaults to object_id +bootable:: + mark partition as bootable, true or false +size:: + the size of the partition (such as 32MB or 15GB, whole numbers + only), '+' for remaining space, or 'n%' for percentage of remaining + (these should only be used after all specific partition sizes are + specified), leave blank if type is "extended". + Defaults to +. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# 128MB linux, bootable +__cinst_partition_msdos /dev/sda1 --type 83 --size 128M --bootable true +# 512MB swap +__cinst_partition_msdos /dev/sda2 --type 82 --size 512M +# extended +__cinst_partition_msdos /dev/sda3 --type extended +# 10GB, linux +__cinst_partition_msdos /dev/sda5 --type 82 --size 10G +# rest of disk, linux +__cinst_partition_msdos /dev/sda6 --type 82 --size + +# same thing as +__cinst_partition_msdos /dev/sda6 --type 82 +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2011 Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/conf/type/__cinst_partition_msdos/manifest b/conf/type/__cinst_partition_msdos/manifest new file mode 100755 index 00000000..e5b04c02 --- /dev/null +++ b/conf/type/__cinst_partition_msdos/manifest @@ -0,0 +1,25 @@ +#!/bin/sh +# +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# + +type + +device +bootable +size diff --git a/conf/type/__cinst_partition_msdos/parameter/optional b/conf/type/__cinst_partition_msdos/parameter/optional new file mode 100644 index 00000000..612fe769 --- /dev/null +++ b/conf/type/__cinst_partition_msdos/parameter/optional @@ -0,0 +1,3 @@ +device +bootable +size diff --git a/conf/type/__cinst_partition_msdos/parameter/required b/conf/type/__cinst_partition_msdos/parameter/required new file mode 100644 index 00000000..aa80e646 --- /dev/null +++ b/conf/type/__cinst_partition_msdos/parameter/required @@ -0,0 +1 @@ +type