Commit 605f3bd9 authored by Luc Didry's avatar Luc Didry
Browse files

Add option to download preseed example

parent 9a39daff
......@@ -8,6 +8,7 @@ Preseed Creator (c) Luc Didry 2017, WTFPL
-i <image.iso> ISO image to preseed. If not provided, the script will download and use the latest Debian amd64 netinst ISO image
-o <preseeded_image.iso> output preseeded ISO image. Default to preseed_creator/debian-netinst-latest-preseed.ISO
-p <preseed_file.cfg> preseed file. If not provided, the script will put "d-i debian-installer/locale string fr_BE" in the preseed.cfg file
-g download the latest Debian stable example preseed file into preseed_example.cfg and exit
-h print this help and exit
EOF
exit
......@@ -17,7 +18,7 @@ INPUT=""
PRESEED=""
MYPWD=$(pwd)
OUTPUT=""
while getopts ":i:o:p:h" opt; do
while getopts ":i:o:p:gh" opt; do
case $opt in
i)
INPUT=$OPTARG
......@@ -28,6 +29,12 @@ while getopts ":i:o:p:h" opt; do
p)
PRESEED=$OPTARG
;;
g)
echo "Downloading latest Debian stable example preseed file into preseed_example.cfg"
wget -q http://www.debian.org/releases/stable/example-preseed.txt -O preseed_example.cfg
echo "Done"
exit
;;
h)
usage
;;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment