+# source core functions {{{
+. /etc/grml/lsb-functions
+. /etc/grml/script-functions
+# }}}
+
+# help text {{{
+usage() {
+ echo "$PN - wrapper around debootstrap for installing Debian
+
+Usage: $PN [options]
+
+Bootstrap options:
+
+ -m, --mirror <URL> Mirror which should be used for apt-get/aptitude.
+ -i, --iso <mnt> Mountpoint where a Debian ISO is mounted to, for use
+ instead of fetching packages from a mirror.
+ -r, --release <name> Release of new Debian system (default: lenny).
+ -t, --target <target> Target partition (/dev/...) or directory where the
+ system should be installed to.
+ -p, --mntpoint <mnt> Mountpoint used for mounting the target system,
+ has no effect if -t is given and represents a directory.
+ --debopt <params> Extra parameters passed to the debootstrap command.
+ --interactive Use interactive mode (frontend).
+ --nodebootstrap Skip debootstrap, only do configuration to the target.
+ --grub <device> Target for grub installation. Usage example: /dev/sda
+ --arch <arch> Architecture to use. Currently only i386 is supported.
+ --filesystem <fs> Filesystem that should be used when target is a partition.
+ --insecure Do not download and check Release file signatures.
+
+Configuration options:
+
+ -c, --config <file> Use specified configuration file, defaults to
+ /etc/debootstrap/config
+ -d, --confdir <path> Place of config files for debootstrap, defaults
+ to /etc/debootstrap
+ --packages <file> Install packages defined in specified list file.
+ --nopackages Skip installation of packages defined in
+ /etc/debootstrap/packages
+ --debconf <file> Pre-seed packages using specified pre-seed db file.
+ --keep_src_list Do not overwrite user provided apt sources.list.
+ --hostname <name> Hostname of Debian system.
+ --password <pwd> Use specified password as password for user root.
+ --bootappend <line> Add specified appendline to kernel whilst booting.
+ --chroot-scripts <d> Execute chroot scripts from specified directory.
+ --pre-scripts <dir> Execute scripts from specified directory (before chroot-scripts).
+ --scripts <dir> Execute scripts from specified directory (after chroot-scripts).
+
+Other options:
+
+ -v, --verbose Increase verbosity.
+ -h, --help Print this usage information and exit.
+ -V, --version Show summary of options and exit.
+
+Usage examples can be found in the grml-debootstrap manpage.
+Send bugreports to the grml-team: bugs (at) grml.org || http://grml.org/bugs/
+"
+}
+
+if [ "$1" = '-h' ] || [ "$1" = '-help' ] ; then
+ usage
+ echo 'Please notice that this script requires root permissions!'
+ exit 0
+fi
+# }}}