summaryrefslogtreecommitdiffstats
path: root/snippets
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-07-27 13:34:01 -0400
committerMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-07-27 13:34:01 -0400
commitdd05c92699e657990c77af311b85fbef30472c11 (patch)
tree25eed399bd27ddcb867c19c1db3724e0e0a92a42 /snippets
parent31a8dfef9c42b77a17ba09d92651cf222b525a00 (diff)
downloadthird_party-cobbler-dd05c92699e657990c77af311b85fbef30472c11.tar.gz
third_party-cobbler-dd05c92699e657990c77af311b85fbef30472c11.tar.xz
third_party-cobbler-dd05c92699e657990c77af311b85fbef30472c11.zip
Added a SNIPPET::foo feature which can do the equivalent of %include in kickstart without the need
for a wget and http hosting. Snippets live in /var/lib/cobbler/snippets -- Cobbler ships with only one snippet now (as a demo), though users can create as many as they want.
Diffstat (limited to 'snippets')
-rw-r--r--snippets/partition_select14
1 files changed, 14 insertions, 0 deletions
diff --git a/snippets/partition_select b/snippets/partition_select
new file mode 100644
index 0000000..a050df0
--- /dev/null
+++ b/snippets/partition_select
@@ -0,0 +1,14 @@
+%include /tmp/partinfo
+
+%pre
+# Determine how many drives we have
+set \$(list-harddrives)
+let numd=\$#/2
+d1=\$1
+d2=\$3
+
+cat << EOF >> /tmp/partinfo
+part / --fstype ext3 --size=1024 --grow --ondisk=\$d1 --asprimary
+part swap --size=1024 --ondisk=\$d1 --asprimary
+EOF
+