* create `create.conf' for `mconf' to read
        * install `create.conf' to $datadir/lxc/scripts

Signed-off-by: Sheng Yong <[email protected]>
---
 config/Makefile.am           |   2 +-
 config/create/Makefile.am    |   3 +
 config/create/create.conf.in | 228 +++++++++++++++++++++++++++++++++++++++++++
 configure.ac                 |   2 +
 4 files changed, 234 insertions(+), 1 deletion(-)
 create mode 100644 config/create/Makefile.am
 create mode 100644 config/create/create.conf.in

diff --git a/config/Makefile.am b/config/Makefile.am
index e40f842..85aa7d1 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -1 +1 @@
-SUBDIRS = apparmor bash etc init templates yum
+SUBDIRS = apparmor bash etc init templates yum create
diff --git a/config/create/Makefile.am b/config/create/Makefile.am
new file mode 100644
index 0000000..1e80d76
--- /dev/null
+++ b/config/create/Makefile.am
@@ -0,0 +1,3 @@
+scriptdir=@LXCSCRIPTDIR@
+
+script_DATA = create.conf 
diff --git a/config/create/create.conf.in b/config/create/create.conf.in
new file mode 100644
index 0000000..2cf7cc5
--- /dev/null
+++ b/config/create/create.conf.in
@@ -0,0 +1,228 @@
+config CONFIG_FILE
+       string "Config file"
+       default ""
+       ---help---
+         Specify the configuration file to configure the virtualization
+         and isolation functionalities for the container.
+
+choice
+       prompt "Templates"
+       default TEMP_NONE
+       ---help---
+         'template' is the short name of an existing 'lxc-template'
+         script that is called by lxc-create, eg. busybox, debian,
+         fedroa, ubuntu or sshd.  Refer to the examples in
+         /usr/local/share/lxc/templates for details of the expected
+         executable template script can also be passed as a parameter.
+         "none" can be used to force lxc-create to skip rootfs
+         creation.
+
+config TEMP_none
+       bool "None"
+
+config TEMP_alpine
+       bool "Alpine"
+
+config TEMP_altlinux
+       bool "Altlinux"
+
+config TEMP_archlinux
+       bool "Archlinux"
+
+config TEMP_busybox
+       bool "Busybox"
+
+config TEMP_centos
+       bool "Centos"
+
+config TEMP_cirros
+       bool "Cirros"
+
+config TEMP_debian
+       bool "Debian"
+
+config TEMP_download
+       bool "Download"
+
+config TEMP_fedora
+       bool "Fedora"
+
+config TEMP_gentoo
+       bool "Gentoo"
+
+config TEMP_openmandriva
+       bool "Open Mandriva"
+
+config TEMP_opensuse
+       bool "Open Suse"
+
+config TEMP_oracle
+       bool "Oracle"
+
+config TEMP_plamo
+       bool "Plamo"
+
+config TEMP_sshd
+       bool "sshd"
+
+config TEMP_ubuntu
+       bool "Ubuntu"
+
+config TEMP_ubuntu_cloud
+       bool "Ubuntu Cloud"
+endchoice
+
+choice
+       prompt "Backing store type"
+       default BS_NONE
+       ---help---
+         'backingstore' is one of 'none', 'dir', 'lvm', 'loop',
+         'btrfs', 'zfs' or 'best'.
+
+config BS_NONE
+       bool "None"
+       ---help---
+         'none' means that the container root filesystem will be a
+         directory under /usr/local/var/lib/lxc/container/rootfs.
+
+config BS_dir
+       bool "dir"
+       ---help---
+         'dir' has the same meaning as 'none', but also allows the
+         optional --dir ROOTFS to be specified, meaning that the
+         container rootfs should be palced under the specific path,
+         rather than the default.
+
+config BS_lvm
+       bool "lvm"
+       ---help---
+         An lvm block device will be used and the following further
+         options are available: --lvname lvname1 will create an LV
+         named lvnam1 rather than the default, which is the container
+         name. --vgname vgname1 will create the LV in volume group
+         vgname1 rather than the default, lxc. --thinpool thinpool1
+         will create the LV as a thin-provisioned volume in the pool
+         named thinpool1 rather the default, lxc. --fstype FSTYPE
+         will create an FSTYPE filesystem on the LV, rather than the
+         default, which is ext4.  --fssize SIZE will create a LV
+         (and filesystem) of size SIZE rather than the default,
+         which is 1G.
+
+config BS_loop
+       bool "loop"
+
+config BS_btrfs
+       bool "btrfs"
+       ---help---
+         The target filesystem must be btrfs, and the container
+         rootfs will be created as a new subvolume. This allows
+         snapshotted clones to be created, but also causes rsync
+         --one-filesystem to treat it as a separate filesystem.
+
+config BS_zfs
+       bool "zfs"
+
+config BS_best
+       bool "best"
+       ---help---
+         LXC will try, in order, btrfs, zfs, lvm, and finally a
+         directory backing store.
+endchoice
+
+config BS_DIR_DIR
+       string "Place rootfs directory under DIR"
+       depends on BS_dir
+       default ""
+       ---help---
+         Place rootfs directory under DIR.
+
+config BS_LVM_LVNAME
+       string "Setting LVM lv name"
+       depends on BS_lvm
+       default ""
+       ---help---
+         Specify the name of LV which will be created. Default value
+         is container name.
+
+config BS_LVM_VGNAME
+       string "Setting LVM vg"
+       depends on BS_lvm
+       default "lxc"
+       ---help---
+         Specify the name of LV volume group. Default value is lxc.
+
+config BS_LVM_THINPOOL
+       string "Setting LVM thin pool"
+       depends on BS_lvm
+       default "lxc"
+       ---help---
+         Specify the pool name in which the LV will be created as a
+         thin-provisioned volume. Defaults value is lxc.
+
+config BS_LVM_FSTYPE
+       string "Setting LVM filesystem type"
+       depends on BS_lvm || BS_loop
+       default "ext4"
+       ---help---
+         Specify the filesystem type on LV or loop. Default value is
+         ext4.
+
+config BS_LVM_FSSIZE
+       string "Setting LVM filesystem size"
+       depends on BS_lvm || BS_loop
+       default "1G"
+       ---help---
+         Specify the size of LV and loop. Default value is 1G. Units
+         are (bBkKmMgGtT).
+
+config BS_ZFS_PATH
+       string "Setting zfs root"
+       depends on BS_zfs
+       default "tank/lxc"
+       ---help---
+        Default is tank/lxc.
+
+config LXC_PATH
+       string "Container path"
+       default "/usr/local/var/lib/lxc"
+       ---help---
+         Use and alternate container path. The default is
+         /usr/local/var/lib/lxc.
+
+config LOG_FILE
+       string "Log file path"
+       default ""
+       ---help---
+         Output to an alternate log file. The default is no log.
+
+choice
+       prompt "Log priority"
+       default LOG_PRIO_ERROR
+
+config LOG_PRIO_FATAL
+       bool "Fatal"
+
+config LOG_PRIO_CRIT
+       bool "Critical"
+
+config LOG_PRIO_WARN
+       bool "Warning"
+
+config LOG_PRIO_ERROR
+       bool "Error"
+
+config LOG_PRIO_NOTICE
+       bool "Notice"
+
+config LOG_PRIO_INFO
+       bool "Info"
+
+config LOG_PRIO_DEBUG
+       bool "Debug"    
+endchoice
+
+config QUIET
+       bool "Mute on"
+       default y
+       ---help---
+         Mute on.
diff --git a/configure.ac b/configure.ac
index c19f2f1..6a0a948 100644
--- a/configure.ac
+++ b/configure.ac
@@ -594,6 +594,8 @@ AC_CONFIG_FILES([
        config/templates/ubuntu.lucid.conf
        config/templates/ubuntu.userns.conf
        config/yum/Makefile
+       config/create/Makefile
+       config/create/create.conf
 
        doc/Makefile
        doc/api/Makefile
-- 
1.9.1

_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to