support --grmlrepos command line option
authorMichael Prokop <mika@grml.org>
Thu, 13 Oct 2011 18:27:13 +0000 (20:27 +0200)
committerMichael Prokop <mika@grml.org>
Thu, 13 Oct 2011 20:03:41 +0000 (22:03 +0200)
chroot-script
cmdlineopts.clp
config
grml-debootstrap
grml-debootstrap.8.txt

index 84086cc..62f24f8 100755 (executable)
@@ -92,7 +92,6 @@ grmlrepos() {
      # user might have provided their own apt sources.list
      if ! grep -q grml /etc/apt/sources.list.d/grml.list 2>/dev/null ; then
         cat >> /etc/apt/sources.list.d/grml.list << EOF
-
 # grml: stable repository:
   deb     http://deb.grml.org/ grml-stable  main
   deb-src http://deb.grml.org/ grml-stable  main
@@ -100,7 +99,6 @@ grmlrepos() {
 # grml: testing/development repository:
   deb     http://deb.grml.org/ grml-testing main
   deb-src http://deb.grml.org/ grml-testing main
-
 EOF
      fi
 
@@ -114,7 +112,7 @@ EOF
        # why it's necessary, sometimes we get an error even though it works [mika]
      fi
 
-     # make sure we install packages from grml's pool only if not available
+     # make sure we install packages from Grml's pool only if not available
      # from Debian!
      if ! grep -q grml /etc/apt/preferences 2>/dev/null ; then
         cat >> /etc/apt/preferences << EOF
index cf8d08a..845ea73 100644 (file)
@@ -12,7 +12,7 @@
 # should be handled in the main script, where it belongs.
 ################################################################################
 
-CMDLINE_OPTS=mirror:,iso:,release:,target:,mntpoint:,debopt:,interactive,nodebootstrap,nopackages,filesystem:,config:,confdir:,packages:,chroot-scripts:,scripts:,pre-scripts:,debconf:,vmfile,vmsize:,keep_src_list,hostname:,password:,nopassword,bootappend:,grub:,arch:,insecure,verbose,help,version,force
+CMDLINE_OPTS=mirror:,iso:,release:,target:,mntpoint:,debopt:,interactive,nodebootstrap,nopackages,filesystem:,config:,confdir:,packages:,chroot-scripts:,scripts:,pre-scripts:,debconf:,vmfile,vmsize:,keep_src_list,hostname:,password:,nopassword,grmlrepos,bootappend:,grub:,arch:,insecure,verbose,help,version,force
 
 _opt_temp=`getopt --name grml-debootstrap -o +m:i:r:t:p:c:d:vhV --long \
     $CMDLINE_OPTS -- "$@"`
@@ -109,6 +109,9 @@ while :; do
   --nopassword)          # Use specified password as password for user root
     _opt_nopassword=T
     ;;
+  --grmlrepos)         # Enable Grml repository
+    _opt_grmlrepos=T
+    ;;
   --bootappend)        # Add specified appendline to kernel whilst booting
     shift; _opt_bootappend="$1"
     ;;
diff --git a/config b/config
index daf4f2e..74ba372 100644 (file)
--- a/config
+++ b/config
@@ -54,8 +54,8 @@ MIRROR='http://cdn.debian.net/debian'
 # /etc/debootstrap/etc/apt/sources.list
 # KEEP_SRC_LIST='yes'
 
-# add grml repository to /etc/apt/sources.list
-# if empty then the repository won't be added (notice: in testing phase)
+# add Grml repository to /etc/apt/sources.list
+# if empty then the repository won't be added
 # GRMLREPOS='yes'
 
 # install packages from grml-pool? requires activated $GRMLREPOS from above
index e041db8..dae3c27 100755 (executable)
@@ -71,6 +71,7 @@ Configuration options:
       --nopackages         Skip installation of packages defined in
                              /etc/debootstrap/packages
       --debconf <file>     Pre-seed packages using specified pre-seed db file.
+      --grmlrepos          Enable Grml's Debian repository (deb.grml.org).
       --keep_src_list      Do not overwrite user provided apt sources.list.
       --hostname <name>    Hostname of Debian system.
       --nopassword         Do not prompt for the root password.
@@ -269,6 +270,7 @@ fi
 [ "$_opt_pre_scripts_set" ]     && PRE_SCRIPTS='yes'
 [ "$_opt_chroot_scripts_set" ]  && CHROOT_SCRIPTS='yes'
 [ "$_opt_keep_src_list" ]       && KEEP_SRC_LIST='yes'
+[ "$_opt_grmlrepos" ]           && GRMLREPOS='yes'
 [ "$_opt_hostname" ]            && HOSTNAME=$_opt_hostname
 [ "$_opt_password" ]            && ROOTPASSWORD=$_opt_password
 [ "$_opt_nopassword" ]          && NOPASSWORD='yes'
@@ -1007,6 +1009,7 @@ preparechroot() {
   [ -n "$KEEP_SRC_LIST" ] && echo "KEEP_SRC_LIST=$KEEP_SRC_LIST" >> $CHROOT_VARIABLES
   [ -n "$MIRROR" ]        && echo "MIRROR=$MIRROR"             >> $CHROOT_VARIABLES
   [ -n "$PACKAGES" ]      && echo "PACKAGES=$PACKAGES"         >> $CHROOT_VARIABLES
+  [ -n "$GRMLREPOS" ]     && echo "GRMLREPOS=$GRMLREPOS"       >> $CHROOT_VARIABLES
   [ -n "$RM_APTCACHE" ]   && echo "RM_APTCACHE=$RM_APTCACHE"   >> $CHROOT_VARIABLES
   [ -n "$ROOTPASSWORD" ]  && echo "ROOTPASSWORD=$ROOTPASSWORD" >> $CHROOT_VARIABLES
   [ -n "$NOPASSWORD" ]    && echo "NOPASSWORD=true"            >> $CHROOT_VARIABLES
index 1ae3ff7..1e3551d 100644 (file)
@@ -75,6 +75,12 @@ Options and environment variables
 
     Skip user acknowledgement and do not prompt for user input.
 
+*--grmlrepos*::
+
+    Enable Grml.org's Debian repository (http://deb.grml.org/) via the
+    /etc/apt/sources.list.d/grml.list configuration file. This provides the
+    option to install Debian packages from Grml's repository.
+
 *--grub* <_device_>::
 
     Device where grub should be installed to. Note that only the MBR (master