From c651514965e8ff75d21a59b2dd857e5803157eb5 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 20 Nov 2008 18:50:55 +0100 Subject: [PATCH] Clarify cmdline option usage --- cmdlineopts.clp | 44 ++++++++++++++++++++++---------------------- debian/changelog | 5 +++-- grml-debootstrap | 40 ++++++++++++++++++---------------------- grml-debootstrap.8.txt | 5 ++--- 4 files changed, 45 insertions(+), 49 deletions(-) diff --git a/cmdlineopts.clp b/cmdlineopts.clp index 9ab44dc..a513314 100644 --- a/cmdlineopts.clp +++ b/cmdlineopts.clp @@ -24,68 +24,68 @@ while :; do case "$1" in # == Bootstrap options - --mirror|-m) # Mirror which should be used for apt-get/aptitude. + --mirror|-m) # Mirror which should be used for apt-get/aptitude shift; _opt_mirror="$1" ;; - --iso|-i) # Mountpoint where a Debian ISO is mounted to, for use instead + --iso|-i) # Mountpoint where a Debian ISO is mounted to shift; _opt_iso="$1" ;; - --release|-r) # Release of new Debian system (default: stable). + --release|-r) # Release of new Debian system (default: stable) shift; _opt_release="$1" ;; - --target|-t) # Target partition (/dev/...) or directory. + --target|-t) # Target partition (/dev/...) or directory shift; _opt_target="$1" ;; - --mntpoint|-p) # Mountpoint used for mounting the target system. + --mntpoint|-p) # Mountpoint used for mounting the target system shift; _opt_mntpoint="$1" ;; - --debopt) # Extra parameters passed to the debootstrap. + --debopt) # Extra parameters passed to the debootstrap shift; _opt_debopt="$1" ;; - --interactive) # Use interactive mode (frontend). + --interactive) # Use interactive mode (frontend) _opt_interactive=T ;; - --nodebootstrap) # Skip debootstrap, only do configuration to the target. + --nodebootstrap) # Skip debootstrap, only do configuration to the target _opt_nodebootstrap=T ;; # # == Configuration options - --config|-c) # Use specified configuration file, defaults to /etc/debootstr + --config|-c) # Use specified configuration file, defaults to /etc/debootstrap shift; _opt_config="$1" ;; - --confdir|-d) # Place of config files for debootstrap, defaults to /etc/debo + --confdir|-d) # Place of config files for debootstrap, defaults to /etc/debootstrap shift; _opt_confdir="$1" ;; - --packages) # Install packages defined in /packages. Option arg: + --packages) # Install packages defined in specified file shift; _opt_packages="$1" _opt_packages_set=T ;; - --debconf) # Pre-seed packages using /debconf-selections. Option + --debconf) # Pre-seed packages using specified file shift; _opt_debconf="$1" _opt_debconf_set=T ;; - --scripts) # Execute scripts from /scripts/. Option + --scripts) # Execute scripts from specified directory shift; _opt_scripts="$1" _opt_scripts_set=T ;; - --chroot-scripts) # Execute scripts from /chroot-scripts/. Option + --chroot-scripts) # Execute chroot scripts from specified directory shift; _opt_chroot_scripts_set="$1" _opt_chroot_scripts_set=T ;; - --keep_src_list) # Do not overwrite user provided apt sources.list. + --keep_src_list) # Do not overwrite user provided apt sources.list _opt_keep_src_list=T ;; - --hostname) # Hostname of Debian system. + --hostname) # Hostname of Debian system shift; _opt_hostname="$1" ;; - --password) # Use specified password as password for user root. + --password) # Use specified password as password for user root shift; _opt_password="$1" ;; - --bootappend) # Add specified appendline to kernel whilst booting. + --bootappend) # Add specified appendline to kernel whilst booting shift; _opt_bootappend="$1" ;; - --groot) # Root device for usage in grub, corresponds with $TARGET in g + --groot) # Root device for usage in grub, corresponds with $TARGET in grub shift; _opt_groot="$1" ;; --grub) # Target for grub installation. Use grub syntax for specifying @@ -93,14 +93,14 @@ while :; do ;; # == Other options - --verbose|-v) # Increase verbosity. + --verbose|-v) # Increase verbosity if [ "$_opt_verbose" ]; then _opt_verbose=`expr $_opt_verbose + 1` else _opt_verbose=1; fi ;; - --help|-h) # Print this usage information and exit. + --help|-h) # Print usage information and exit _opt_help=T ;; - --version|-V) # Show summary of options and exit. + --version|-V) # Show version information and exit _opt_version=T ;; --) diff --git a/debian/changelog b/debian/changelog index 5ca67ef..4b938b9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,13 +21,14 @@ grml-debootstrap (0.23) unstable; urgency=low - added "--nodebootstrap": Skip debootstrap, only do configuration to the target - add -v, --verbose: Increase verbosity - - do not create stage file for finalize + - do not create stage file at finalize() * Edit /etc/network/interfaces as well if the file exists already, we definitely need at least a loopback interface. * Adjust hostname in /etc/postfix/main.cf. * Unify the --bootappend option, it's not --boot_append (thanks for the hint, Tong Sun). - * Support execution of further scripts via --scripts and --chroot-scripts. + * Support execution of further scripts via options --scripts and + --chroot-scripts. * Drop locales from RECONFIGURE list (thanks for hint, Tong Sun). [Closes: issue560] diff --git a/grml-debootstrap b/grml-debootstrap index 7b1bc72..0821225 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -36,38 +36,34 @@ 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 + -m, --mirror Mirror which should be used for apt-get/aptitude. + -i, --iso 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: stable). - -t, --target=target Target partition (/dev/...) or directory. - -p, --mntpoint=mnt Mountpoint used for mounting the target system. - --debopt=params Extra parameters passed to the debootstrap. + -r, --release Release of new Debian system (default: stable). + -t, --target Target partition (/dev/...) or directory. + -p, --mntpoint Mountpoint used for mounting the target system. + --debopt Extra parameters passed to the debootstrap. --interactive Use interactive mode (frontend). --nodebootstrap Skip debootstrap, only do configuration to the target. - --groot=device Root device for usage in grub, corresponds with + --groot Root device for usage in grub, corresponds with \$TARGET in grub syntax, like hd0,0 for /dev/sda1. - --grub=device Target for grub installation. Use grub syntax for + --grub Target for grub installation. Use grub syntax for specifying, like hd0 for /dev/sda. Configuration options: - -c, --config=file Use specified configuration file, defaults to + -c, --config Use specified configuration file, defaults to /etc/debootstrap/config - -d, --confdir=path Place of config files for debootstrap, defaults + -d, --confdir Place of config files for debootstrap, defaults to /etc/debootstrap - --packages[=f] Install packages defined in /packages. - Option arg: alternative package list file. - --debconf[=f] Pre-seed packages using /debconf-selections. - Option arg: alternative pre-seed db file. + --packages Install packages defined in specified list file. + --debconf 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[=f] Execute scripts from /chroot-scripts/ - Option arg: alternative chroot-scripts directory. - --scripts[=d] Execute scripts from /scripts/. - Option arg: alternative scripts directory. + --hostname Hostname of Debian system. + --password Use specified password as password for user root. + --bootappend Add specified appendline to kernel whilst booting. + --chroot-scripts Execute scripts specified chroot-scripts directory. + --scripts Execute scripts from specified scripts directory. Other options: @@ -76,7 +72,7 @@ Other options: -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@grml.org || http://grml.org/bugs/ +Send bugreports to the grml-team: bugs (at) grml.org || http://grml.org/bugs/ " } diff --git a/grml-debootstrap.8.txt b/grml-debootstrap.8.txt index dbdc209..df7cdae 100644 --- a/grml-debootstrap.8.txt +++ b/grml-debootstrap.8.txt @@ -85,10 +85,9 @@ Options and environment variables Specify mountpoint that should be used for mounting the target system. Corresponding with configuration variable MNTPOINT. -*--packages* [<_file_>]:: +*--packages* <_file_>:: Use specified file as list for packages that should be installed instead of - the default package list file /packages. If no file parameter is given - it activates the default package list file /packages. + the default package list file /packages. *--password* <_password_>:: Use specified password as password for user root. Use with caution, as your -- 2.1.4