From c907da2ad14e7bc44091419378be8625e0b18155 Mon Sep 17 00:00:00 2001 From: Chris Lamb Date: Wed, 9 Jul 2008 00:13:09 +0100 Subject: Add --ignore-system-defaults option to not source /etc/default/live-helper. --- helpers/lh_config | 10 ++++++++-- manpages/lh_config.en.1 | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/helpers/lh_config b/helpers/lh_config index 520baaa..fc3a077 100755 --- a/helpers/lh_config +++ b/helpers/lh_config @@ -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}" diff --git a/manpages/lh_config.en.1 b/manpages/lh_config.en.1 index 3509937..cf9d4e5 100644 --- a/manpages/lh_config.en.1 +++ b/manpages/lh_config.en.1 @@ -82,6 +82,8 @@ lh_config \- create configuration for live\-helper .br [\fB\-\-hostname\fR \fINAME\fR] .br + [\fB\-\-ignore\-system\-defaults\fR] +.br [\fB\-\-includes\fR \fIPATH\fR] .br [\fB\-\-initramfs\fR auto|live\-initramfs|casper] @@ -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) -- cgit v1.0