4 # shell script command line parameter-processing for:
6 # grml-debootstrap - wrapper around debootstrap for installing plain Debian via
10 # @Release: $Revision: 1.1 $, under the BSD license
11 # @HomeURL: http://xpt.sourceforge.net/
14 # @WARNING: Do NOT modify this file without prior contacting the author.
15 # This script is use for the command line *logic* processing. It should be
16 # as dumb as possible. I.e., it should NOT be more complicated than
17 # copy-paste-and-rename from existing code. All *business-logic* processing
18 # should be handled in the main script, where it belongs.
23 -o +m:i:r:t:p:c:hv --long \
24 mirror:,iso:,release:,target:,mntpoint:,debopt:,interactive,config:,packages::,debconf::,keep_src_list,hostname:,password:,bootappend:,groot:,grub:,help,version \
30 # == Bootstrap options
31 --mirror|-m) # Mirror which should be used for apt-get/aptitude.
32 shift; _opt_mirror="$1"
34 --iso|-i) # Mountpoint where a Debian ISO is mounted to, for use instead
37 --release|-r) # Release of new Debian system (default: stable).
38 shift; _opt_release="$1"
40 --target|-t) # Target partition (/dev/...) or directory.
41 shift; _opt_target="$1"
43 --mntpoint|-p) # Mountpoint used for mounting the target system.
44 shift; _opt_mntpoint="$1"
46 --debopt) # Extra parameters passed to the debootstrap.
47 shift; _opt_debopt="$1"
49 --interactive) # Use interactive mode (frontend).
54 # == Configuration options
55 --config|-c) # Use specified configuration file, defaults to /etc/debootstr
56 shift; _opt_config="$1"
58 --packages) # Install packages defined in /etc/debootstrap/packages. Optio
59 shift; _opt_packages="$1"
62 --debconf) # Pre-seed packages using /etc/debootstrap/debconf-selections.
63 shift; _opt_debconf="$1"
66 --keep_src_list) # Do not overwrite user provided apt sources.list.
69 --hostname) # Hostname of Debian system.
70 shift; _opt_hostname="$1"
72 --password) # Use specified password as password for user root.
73 shift; _opt_password="$1"
76 --bootappend) # Add specified appendline to kernel whilst booting.
77 shift; _opt_bootappend="$1"
79 --groot) # Root device for usage in grub, corresponds with $TARGET in g
80 shift; _opt_groot="$1"
82 --grub) # Target for grub installation. Use grub syntax for specifying
87 --help|-h) # Print this usage information and exit.
90 --version|-v) # Show summary of options and exit.
97 eerror "Internal getopt error!"; eend 1 ; exit 1