Add --ignore-system-defaults option to not source /etc/default/live-helper.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
This commit is contained in:
Chris Lamb 2008-07-09 00:13:09 +01:00
parent 731a5c3d6f
commit 2de3396734
2 changed files with 12 additions and 3 deletions

View File

@ -64,6 +64,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--grub-splash FILE]\n\
\t [--hooks FILE]\n\
\t [--hostname NAME]\n\
\t [--ignore-system-defaults]\n
\t [--includes PATH]\n\
\t [--initramfs auto|live-initramfs|casper]\n\
\t [--interactive shell]\n\
@ -117,7 +118,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
Local_arguments ()
{
ARGUMENTS="$(getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-options:,aptitute-options:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,fdisk:,losetup:,mode:,root-command:,use-fakeroot:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,exposed-root:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-filesystem:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,chroot-build:,debian-installer:,debian-installer-daily:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:,net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,net-cow-server:,net-tarball:,syslinux-splash:,syslinux-timeout:,syslinux-menu:,username:,source:,source-images:,breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")"
ARGUMENTS="$(getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-options:,aptitute-options:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,fdisk:,losetup:,mode:,root-command:,use-fakeroot:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,exposed-root:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-filesystem:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,chroot-build:,debian-installer:,debian-installer-daily:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:,net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,net-cow-server:,net-tarball:,syslinux-splash:,syslinux-timeout:,syslinux-menu:,username:,source:,source-images:,breakpoints,conffile:,debug,force,help,ignore-system-defaults,quiet,usage,verbose,version --name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")"
if [ "${?}" != "0" ]
then
@ -620,6 +621,11 @@ Local_arguments ()
shift
;;
--ignore-system-defaults)
_LH_IGNORE_SYSTEM_DEFAULTS="enabled"
shift
;;
--quiet)
LH_QUIET="enabled"
shift
@ -654,7 +660,7 @@ Local_arguments ()
}
# Reading system configuration
if [ -f "${SYSTEM_LH_CONFFILE}" ]
if [ -f "${SYSTEM_LH_CONFFILE}" ] && [ "${_LH_IGNORE_SYSTEM_DEFAULTS}" != "enabled" ]
then
Echo_message "Using system defaults from ${SYSTEM_LH_CONFFILE}"
Read_conffile "${SYSTEM_LH_CONFFILE}"

View File

@ -81,6 +81,8 @@ lh_config \- create configuration for live\-helper
[\fB\-\-hooks\fR \fIFILE\fR]
.br
[\fB\-\-hostname\fR \fINAME\fR]
.br
[\fB\-\-ignore\-system\-defaults\fR]
.br
[\fB\-\-includes\fR \fIPATH\fR]
.br
@ -282,7 +284,8 @@ environment variable. Environment variables are name LH_FOO, means, e.g.
.I /etc/default/live-helper
.PP
An optional conffile for lh_config defaults, useful to specify a few system wide defaults, like
LH_MIRROR_BOOTSTRAP.
LH_MIRROR_BOOTSTRAP. This feature can be disabled by specifying the
\fB\-\-ignore\-system\-defaults\fR option.
.SH SEE ALSO
\fIlive\-helper\fR(7)