From: Tong Sun Date: Fri, 17 Oct 2008 21:56:13 +0000 (-0400) Subject: To close Issue556 X-Git-Tag: v0.23~17^2~3 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=364ca0650742d2b6700c614be1dad5a1ec108c23;hp=a08e5b7632b67aea49d355f251c2486ef2a6fd91 To close Issue556 added option --nodebootstrap Skip debootstrap, only do configuration to the target. and its handling. --- diff --git a/grml-debootstrap b/grml-debootstrap index 9d951ec..d4957a4 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -45,6 +45,7 @@ Bootstrap options: -p, --mntpoint=mnt Mountpoint used for mounting the target system. --debopt=params Extra parameters passed to the debootstrap. --interactive Use interactive mode (frontend). + --nodebootstrap Skip debootstrap, only do configuration to the target. Configuration options: @@ -689,6 +690,10 @@ debootstrap_system() { if ! grep -q $MNTPOINT /proc/mounts ; then mount_target fi + if [ "$_opt_nodebootstrap" ]; then + einfo "Skipping debootstrap as requested." + return + fi if grep -q $MNTPOINT /proc/mounts || [ -n "$DIRECTORY" ] ; then einfo "Running $DEBOOTSTRAP $DEBOOTSTRAP_OPT for release ${RELEASE}${ARCHINFO} using ${MIRROR}${ISO}" [ -n "$MIRROR" ] && $DEBOOTSTRAP $ARCHCMD $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $MIRROR || \ diff --git a/grml-debootstrap.clp b/grml-debootstrap.clp index 2038db8..06dd390 100644 --- a/grml-debootstrap.clp +++ b/grml-debootstrap.clp @@ -7,7 +7,7 @@ # grml # # @Author: Tong SUN -# @Release: $Revision: 1.2 $, under the BSD license +# @Release: $Revision: 1.3 $, under the BSD license # @HomeURL: http://xpt.sourceforge.net/ # @@ -20,7 +20,7 @@ _opt_temp=`getopt --name grml-debootstrap -o +m:i:r:t:p:c:d:hv --long \ - mirror:,iso:,release:,target:,mntpoint:,debopt:,interactive,config:,confdir:,packages::,debconf::,keep_src_list,hostname:,password:,bootappend:,groot:,grub:,help,version \ + mirror:,iso:,release:,target:,mntpoint:,debopt:,interactive,nodebootstrap,config:,confdir:,packages::,debconf::,keep_src_list,hostname:,password:,bootappend:,groot:,grub:,help,version \ -- "$@"` if [ $? != 0 ]; then eerror "Try 'grml-debootstrap --help' for more information."; eend 1; exit 1 @@ -52,6 +52,9 @@ while :; do --interactive) # Use interactive mode (frontend). _opt_interactive=T ;; + --nodebootstrap) # Skip debootstrap, only do configuration to the target. + _opt_nodebootstrap=T + ;; # # == Configuration options