summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorLyndon Brown <jnqnfe@gmail.com>2020-05-03 00:58:18 +0100
committerLyndon Brown <jnqnfe@gmail.com>2020-05-03 01:31:47 +0100
commit43b4f9cdf62972bff5cff45f895305c391a895f2 (patch)
treef9c7628c66999bad84efed0de9183821e5013e84 /scripts/build
parent372a8fd91a9ec22c22250e4a0322432305b69a9f (diff)
downloadvyos-live-build-43b4f9cdf62972bff5cff45f895305c391a895f2.tar.gz
vyos-live-build-43b4f9cdf62972bff5cff45f895305c391a895f2.zip
adjust action arg consumption order
did not properly consider all usage cases properly in deciding placement. this captured `--usage` in `$PROGRAM --usage` as the action for instance. Gbp-Dch: Ignore
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/bootstrap_cache6
-rwxr-xr-xscripts/build/chroot_apt6
-rwxr-xr-xscripts/build/chroot_archives6
-rwxr-xr-xscripts/build/chroot_cache6
-rwxr-xr-xscripts/build/chroot_debianchroot6
-rwxr-xr-xscripts/build/chroot_devpts6
-rwxr-xr-xscripts/build/chroot_dpkg6
-rwxr-xr-xscripts/build/chroot_hostname6
-rwxr-xr-xscripts/build/chroot_hosts6
-rwxr-xr-xscripts/build/chroot_proc6
-rwxr-xr-xscripts/build/chroot_resolv6
-rwxr-xr-xscripts/build/chroot_selinuxfs6
-rwxr-xr-xscripts/build/chroot_sysfs6
-rwxr-xr-xscripts/build/chroot_sysv-rc6
-rwxr-xr-xscripts/build/chroot_tmpfs6
15 files changed, 45 insertions, 45 deletions
diff --git a/scripts/build/bootstrap_cache b/scripts/build/bootstrap_cache
index 1c3c7ff25..cc1ac755e 100755
--- a/scripts/build/bootstrap_cache
+++ b/scripts/build/bootstrap_cache
@@ -18,12 +18,12 @@ set -e
DESCRIPTION="Cache bootstrap stage"
USAGE="${PROGRAM} {restore|save} [--force]"
-_ACTION="${1}"
-shift
-
# Processing arguments and configuration files
Init_config_data "${@}"
+_ACTION="${1}"
+shift
+
# Check architecture
Check_crossarchitectures
diff --git a/scripts/build/chroot_apt b/scripts/build/chroot_apt
index b1fceffaa..466d1fe2e 100755
--- a/scripts/build/chroot_apt
+++ b/scripts/build/chroot_apt
@@ -18,12 +18,12 @@ set -e
DESCRIPTION="Manage /etc/apt/apt.conf"
USAGE="${PROGRAM} {install|install-binary|remove} [--force]"
-_ACTION="${1}"
-shift
-
# Processing arguments and configuration files
Init_config_data "${@}"
+_ACTION="${1}"
+shift
+
# Requiring stage file
Require_stagefiles config bootstrap
diff --git a/scripts/build/chroot_archives b/scripts/build/chroot_archives
index c6d4c1b84..7f13a4a7d 100755
--- a/scripts/build/chroot_archives
+++ b/scripts/build/chroot_archives
@@ -18,6 +18,9 @@ set -e
DESCRIPTION="Manage /etc/apt/sources.list"
USAGE="${PROGRAM} {source|binary|chroot} {install|remove} [--force]"
+# Processing arguments and configuration files
+Init_config_data "${@}"
+
_PASS="${1}"
_ACTION="${2}"
shift 2
@@ -26,9 +29,6 @@ if ! In_list "${_PASS}" "binary" "chroot" "source"; then
Usage --fail
fi
-# Processing arguments and configuration files
-Init_config_data "${@}"
-
# Requiring stage file
Require_stagefiles config bootstrap
diff --git a/scripts/build/chroot_cache b/scripts/build/chroot_cache
index 451cda1e0..729584c23 100755
--- a/scripts/build/chroot_cache
+++ b/scripts/build/chroot_cache
@@ -18,12 +18,12 @@ set -e
DESCRIPTION="Cache chroot stage"
USAGE="${PROGRAM} {restore|save} [--force]"
-_ACTION="${1}"
-shift
-
# Processing arguments and configuration files
Init_config_data "${@}"
+_ACTION="${1}"
+shift
+
if ! In_list "chroot" ${LB_CACHE_STAGES}
then
exit 0
diff --git a/scripts/build/chroot_debianchroot b/scripts/build/chroot_debianchroot
index 25fb725ad..862d9b5d7 100755
--- a/scripts/build/chroot_debianchroot
+++ b/scripts/build/chroot_debianchroot
@@ -18,12 +18,12 @@ set -e
DESCRIPTION="Manage /etc/debian_chroot"
USAGE="${PROGRAM} {install|remove} [--force]"
-_ACTION="${1}"
-shift
-
# Processing arguments and configuration files
Init_config_data "${@}"
+_ACTION="${1}"
+shift
+
# Requiring stage file
Require_stagefiles config bootstrap
diff --git a/scripts/build/chroot_devpts b/scripts/build/chroot_devpts
index cc1e31321..3877fac83 100755
--- a/scripts/build/chroot_devpts
+++ b/scripts/build/chroot_devpts
@@ -18,12 +18,12 @@ set -e
DESCRIPTION="Mount /dev/pts"
USAGE="${PROGRAM} {install|remove} [--force]"
-_ACTION="${1}"
-shift
-
# Processing arguments and configuration files
Init_config_data "${@}"
+_ACTION="${1}"
+shift
+
# Requiring stage file
Require_stagefiles config bootstrap
diff --git a/scripts/build/chroot_dpkg b/scripts/build/chroot_dpkg
index e9c4dd760..c43c0eb01 100755
--- a/scripts/build/chroot_dpkg
+++ b/scripts/build/chroot_dpkg
@@ -18,12 +18,12 @@ set -e
DESCRIPTION="Manage /sbin/dpkg"
USAGE="${PROGRAM} {install|remove} [--force]"
-_ACTION="${1}"
-shift
-
# Processing arguments and configuration files
Init_config_data "${@}"
+_ACTION="${1}"
+shift
+
# Requiring stage file
Require_stagefiles config bootstrap
diff --git a/scripts/build/chroot_hostname b/scripts/build/chroot_hostname
index eb2fd02e5..2b7f3920f 100755
--- a/scripts/build/chroot_hostname
+++ b/scripts/build/chroot_hostname
@@ -18,12 +18,12 @@ set -e
DESCRIPTION="Manage /bin/hostname"
USAGE="${PROGRAM} {install|remove} [--force]"
-_ACTION="${1}"
-shift
-
# Processing arguments and configuration files
Init_config_data "${@}"
+_ACTION="${1}"
+shift
+
# Requiring stage file
Require_stagefiles config bootstrap
diff --git a/scripts/build/chroot_hosts b/scripts/build/chroot_hosts
index ee0ca3452..299dfa548 100755
--- a/scripts/build/chroot_hosts
+++ b/scripts/build/chroot_hosts
@@ -18,12 +18,12 @@ set -e
DESCRIPTION="Manage /etc/hosts"
USAGE="${PROGRAM} {install|remove} [--force]"
-_ACTION="${1}"
-shift
-
# Processing arguments and configuration files
Init_config_data "${@}"
+_ACTION="${1}"
+shift
+
# Requiring stage file
Require_stagefiles config bootstrap
diff --git a/scripts/build/chroot_proc b/scripts/build/chroot_proc
index 7f89fdd55..fcc866932 100755
--- a/scripts/build/chroot_proc
+++ b/scripts/build/chroot_proc
@@ -18,12 +18,12 @@ set -e
DESCRIPTION="Mount /proc"
USAGE="${PROGRAM} {install|remove} [--force]"
-_ACTION="${1}"
-shift
-
# Processing arguments and configuration files
Init_config_data "${@}"
+_ACTION="${1}"
+shift
+
# Requiring stage file
Require_stagefiles config bootstrap
diff --git a/scripts/build/chroot_resolv b/scripts/build/chroot_resolv
index 09fb6ee90..c943f259d 100755
--- a/scripts/build/chroot_resolv
+++ b/scripts/build/chroot_resolv
@@ -18,12 +18,12 @@ set -e
DESCRIPTION="Manage /etc/resolv.conf"
USAGE="${PROGRAM} {install|remove} [--force]"
-_ACTION="${1}"
-shift
-
# Processing arguments and configuration files
Init_config_data "${@}"
+_ACTION="${1}"
+shift
+
# Requiring stage file
Require_stagefiles config bootstrap
diff --git a/scripts/build/chroot_selinuxfs b/scripts/build/chroot_selinuxfs
index cb19b5846..c18a3e741 100755
--- a/scripts/build/chroot_selinuxfs
+++ b/scripts/build/chroot_selinuxfs
@@ -18,12 +18,12 @@ set -e
DESCRIPTION="Mount /sys/fs/selinux"
USAGE="${PROGRAM} {install|remove} [--force]"
-_ACTION="${1}"
-shift
-
# Processing arguments and configuration files
Init_config_data "${@}"
+_ACTION="${1}"
+shift
+
# Requiring stage file
Require_stagefiles config bootstrap
diff --git a/scripts/build/chroot_sysfs b/scripts/build/chroot_sysfs
index 7d0e38cf3..a9ac0290c 100755
--- a/scripts/build/chroot_sysfs
+++ b/scripts/build/chroot_sysfs
@@ -18,12 +18,12 @@ set -e
DESCRIPTION="Mount /sys"
USAGE="${PROGRAM} {install|remove} [--force]"
-_ACTION="${1}"
-shift
-
# Processing arguments and configuration files
Init_config_data "${@}"
+_ACTION="${1}"
+shift
+
# Requiring stage file
Require_stagefiles config bootstrap
diff --git a/scripts/build/chroot_sysv-rc b/scripts/build/chroot_sysv-rc
index a5b22f773..ffe6baa35 100755
--- a/scripts/build/chroot_sysv-rc
+++ b/scripts/build/chroot_sysv-rc
@@ -18,12 +18,12 @@ set -e
DESCRIPTION="Manage /usr/sbin/policy-rc.d"
USAGE="${PROGRAM} {install|remove} [--force]"
-_ACTION="${1}"
-shift
-
# Processing arguments and configuration files
Init_config_data "${@}"
+_ACTION="${1}"
+shift
+
# Requiring stage file
Require_stagefiles config bootstrap
diff --git a/scripts/build/chroot_tmpfs b/scripts/build/chroot_tmpfs
index 93fec81c3..e289c40bc 100755
--- a/scripts/build/chroot_tmpfs
+++ b/scripts/build/chroot_tmpfs
@@ -18,12 +18,12 @@ set -e
DESCRIPTION="Use tmpfs to speedup the build"
USAGE="${PROGRAM} {install|remove} [--force]"
-_ACTION="${1}"
-shift
-
# Processing arguments and configuration files
Init_config_data "${@}"
+_ACTION="${1}"
+shift
+
if [ "${LB_BUILD_WITH_TMPFS}" != "true" ]
then
exit 0