# should be handled in the main script, where it belongs.
################################################################################
-CMDLINE_OPTS=mirror:,iso:,release:,target:,mntpoint:,debopt:,defaultinterfaces,interactive,nodebootstrap,nointerfaces,nokernel,nopackages,filesystem:,config:,confdir:,packages:,chroot-scripts:,scripts:,post-scripts:,pre-scripts:,debconf:,vm,vmfile,vmsize:,keep_src_list,hostname:,password:,nopassword,grmlrepos,backportrepos,bootappend:,grub:,arch:,insecure,verbose,help,version,force,debug,contrib,non-free
+CMDLINE_OPTS=mirror:,iso:,release:,target:,mntpoint:,debopt:,defaultinterfaces,interactive,nodebootstrap,nointerfaces,nokernel,nopackages,filesystem:,config:,confdir:,packages:,chroot-scripts:,scripts:,post-scripts:,pre-scripts:,debconf:,vm,vmfile,vmsize:,keep_src_list,hostname:,password:,nopassword,grmlrepos,backportrepos,bootappend:,grub:,arch:,insecure,verbose,help,version,force,debug,contrib,non-free,remove-configs
_opt_temp=`getopt --name grml-debootstrap -o +m:i:r:t:p:c:d:vhV --long \
$CMDLINE_OPTS -- "$@"`
--non-free) # Add 'non-free' to list of components
_opt_non_free=T
;;
+ --remove-configs) # Drop config files from installed system
+ _opt_remove_configs=T
+ ;;
# == Other options
--verbose|-v) # Increase verbosity
--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).
+ --remove-configs Delete grml-debootstrap configuration files from installed system.
Other options:
einfo "Removing ${STAGES}" ; rmdir "$STAGES" ; eend $?
fi
+ if [ "$REMOVE_CONFIGS" = "yes" ] ; then
+ einfo "Removing configuration files from installed system as requested via --remove-configs / REMOVE_CONFIGS."
+ rm -rf "${MNTPOINT}"/etc/debootstrap/
+ eend $?
+ fi
+
# Remove temporary mountpoint again
if echo "$MNTPOINT" | grep -q '/mnt/debootstrap\.' ; then
rmdir "$MNTPOINT" 2>/dev/null
[ "$_opt_force" ] && FORCE=$_opt_force
[ "$_opt_verbose" ] && VERBOSE="-v"
[ "$_opt_debug" ] && DEBUG="true"
+[ "$_opt_remove_configs" ] && REMOVE_CONFIGS="yes"
# make sure main is always included
[ -z "$COMPONENTS" ] && COMPONENTS="main"
squeeze, wheezy, jessie, stretch (note: requires a recent version of debootstrap)
and sid. Corresponding with configuration variable RELEASE.
+*--remove-configs*::
+
+ Delete grml-debootstrap configuration files (/etc/debootstrap/*) from installed
+ system. Useful for reproducible builds or if you don't want to leak information.
+
*-t*, *--target* _target_::
Target partition (/dev/...) or directory (anything else without /dev at the