summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-09-30 00:56:49 +0200
committerDaniel Baumann <daniel@debian.org>2011-09-30 00:56:49 +0200
commit96e86b96d8b0c38cfcbef4201c5de112030d0326 (patch)
tree0513043052e30d5fccd8679a94c5b85fe9332bdd /scripts/build
parent6b8183c277c3306d3d497f0479fb0545b9d3d990 (diff)
downloadvyos-live-build-96e86b96d8b0c38cfcbef4201c5de112030d0326.tar.gz
vyos-live-build-96e86b96d8b0c38cfcbef4201c5de112030d0326.zip
Adding --system option to define the resulting image type to be a live system or a normal, non-live system.
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/lb_chroot_live-packages11
-rwxr-xr-xscripts/build/lb_config12
2 files changed, 15 insertions, 8 deletions
diff --git a/scripts/build/lb_chroot_live-packages b/scripts/build/lb_chroot_live-packages
index 31734a8d8..ef8292e09 100755
--- a/scripts/build/lb_chroot_live-packages
+++ b/scripts/build/lb_chroot_live-packages
@@ -36,25 +36,22 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
-_PACKAGES=""
-
-# Queue installation of linux-image and ${LB_INITRAMFS}
-if [ "${LB_INITRAMFS}" != "none" ]
+# Queue installation of live-boot
+if [ -n "${LB_INITRAMFS}" ] && [ "${LB_INITRAMFS}" != "none" ]
then
_PACKAGES="${LB_INITRAMFS}"
fi
# Queue installation of live-config
-if [ "${LB_INITSYSTEM}" != "none" ]
+if [ -n "${LB_INITSYSTEM}" ] && [ "${LB_INITSYSTEM}" != "none" ]
then
_PACKAGES="${_PACKAGES} live-config live-config-${LB_INITSYSTEM}"
fi
# Do initsystem specific hacks
-if [ "${LB_INITSYSTEM}" != "sysvinit" ]
+if [ -n "${LB_INITSYSTEM}" ] && [ "${LB_INITSYSTEM}" != "sysvinit" ]
then
# lets see if we still need the squeeze's "pre init system policy discussion" hack:
-
IS_SYSVINIT_ESSENTIAL="$(Chroot chroot dpkg-query --show --showformat='${Essential}\n' sysvinit)"
RC="$?"
diff --git a/scripts/build/lb_config b/scripts/build/lb_config
index 56dc93129..3f7ab0fe8 100755
--- a/scripts/build/lb_config
+++ b/scripts/build/lb_config
@@ -116,6 +116,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--mirror-binary-backports URL]\n\
\t [--mirror-debian-installer URL]\n\
\t [--mode debian|emdebian|ubuntu|kubuntu]\n\
+\t [--system live|normal]\n\
\t [--net-root-filesystem nfs|cfs]\n\
\t [--net-root-mountoptions OPTIONS]\n\
\t [--net-root-path PATH]\n\
@@ -153,7 +154,7 @@ Local_arguments ()
LONG_OPTIONS="apt:,apt-ftp-proxy:,apt-http-proxy:,apt-options:,aptitute-options:,
apt-pipeline:,apt-recommends:,apt-secure:,apt-source-archives:,bootstrap:,cache:,cache-indices:,cache-packages:,
cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,dump,
- initramfs:,initramfs-compression:,initsystem:,fdisk:,losetup:,mode:,root-command:,use-fakeroot:,tasksel:,includes:,
+ initramfs:,initramfs-compression:,initsystem:,fdisk:,losetup:,mode:,system:,root-command:,use-fakeroot:,tasksel:,includes:,
templates:,architectures:,bootstrap-flavour:,bootstrap-keyring:,clean,
distribution:,parent-distribution:,parent-debian-installer-distribution:,parent-mirror-bootstrap:,parent-mirror-chroot:,parent-mirror-chroot-security:,parent-mirror-chroot-volatile:,parent-mirror-chroot-backports:,parent-mirror-binary:,
parent-mirror-binary-security:,parent-mirror-binary-volatile:,parent-mirror-binary-backports:,parent-mirror-debian-installer:,
@@ -347,6 +348,11 @@ Local_arguments ()
shift 2
;;
+ --system)
+ LB_SYSTEM="${2}"
+ shift 2
+ ;;
+
--root-command)
LB_ROOT_COMMAND="${2}"
shift 2
@@ -981,6 +987,10 @@ LB_LOSETUP="${LB_LOSETUP}"
# (Default: ${LB_MODE})
LB_MODE="${LB_MODE}"
+# \$LB_SYSTEM: set system type
+# (Default: ${LB_SYSTEM})
+LB_SYSTEM="${LB_SYSTEM}"
+
# \$LB_ROOT_COMMAND: use sudo or equivalent
# (Default: empty)
#LB_ROOT_COMMAND="sudo"