From: Michael Prokop Date: Thu, 13 Oct 2011 18:27:13 +0000 (+0200) Subject: support --grmlrepos command line option X-Git-Tag: v0.48~9 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=a7bfe23bbce2453b007e827d401afaef99156a29 support --grmlrepos command line option --- diff --git a/chroot-script b/chroot-script index 84086cc..62f24f8 100755 --- a/chroot-script +++ b/chroot-script @@ -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 diff --git a/cmdlineopts.clp b/cmdlineopts.clp index cf8d08a..845ea73 100644 --- a/cmdlineopts.clp +++ b/cmdlineopts.clp @@ -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 --- 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 diff --git a/grml-debootstrap b/grml-debootstrap index e041db8..dae3c27 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -71,6 +71,7 @@ Configuration options: --nopackages Skip installation of packages defined in /etc/debootstrap/packages --debconf 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 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 diff --git a/grml-debootstrap.8.txt b/grml-debootstrap.8.txt index 1ae3ff7..1e3551d 100644 --- a/grml-debootstrap.8.txt +++ b/grml-debootstrap.8.txt @@ -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