diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2013-11-03 21:07:22 +0100 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2013-11-03 21:18:10 +0100 |
commit | 1bcc4494831e3b55b6f8f83f2a2fa4de2b77fc9d (patch) | |
tree | 13195f95153493ba760557cbe3a8182e48c3d822 | |
parent | 037066598afb3baa17a7000dba43b0d63002619c (diff) | |
download | vyos-live-build-1bcc4494831e3b55b6f8f83f2a2fa4de2b77fc9d.tar.gz vyos-live-build-1bcc4494831e3b55b6f8f83f2a2fa4de2b77fc9d.zip |
Automatically symlink hooks upon creation of the configuration tree.
-rwxr-xr-x | functions/defaults.sh | 22 | ||||
-rwxr-xr-x | scripts/build/config | 20 |
2 files changed, 9 insertions, 33 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh index 65e3a29ae..2c4e8458e 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -501,28 +501,6 @@ Set_defaults () # Setting union filesystem LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM:-aufs}" - # Setting distribution hooks - LB_CHROOT_HOOKS="${LB_CHROOT_HOOKS:-disable-kexec-tools \ - remove-adjtime-configuration \ - remove-backup-files \ - remove-dbus-machine-id \ - remove-gnome-icon-cache \ - remove-log-files \ - remove-mdadm-configuration \ - remove-openssh-server-host-keys \ - remove-python-py \ - remove-temporary-files \ - remove-ssl-cert-snakeoil \ - remove-udev-persistent-cd-rules \ - remove-udev-persistent-net-rules \ - remove-systemd-machine-id \ - update-apt-file-cache \ - update-apt-xapian-index \ - update-glx-alternative \ - update-mlocate-database \ - update-nvidia-alternative}" - #remove-apt-sources-lists - # Setting interactive shell/X11/Xnest LB_INTERACTIVE="${LB_INTERACTIVE:-false}" diff --git a/scripts/build/config b/scripts/build/config index 5a8203fd8..5f8012edb 100755 --- a/scripts/build/config +++ b/scripts/build/config @@ -61,7 +61,6 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\ \t [--force]\n\ \t [--grub-splash FILE]\n\ \t [--gzip-options OPTION|\"OPTIONS\"]\n\ -\t [--hooks FILE]\n\ \t [--ignore-system-defaults]\n\ \t [--initramfs auto|none|live-boot|casper]\n\ \t [--initramfs-compression bzip2|gzip|lzma]\n\ @@ -138,7 +137,7 @@ Local_arguments () mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:, mirror-binary-security:,mirror-debian-installer:, archive-areas:,parent-archive-areas:,chroot-filesystem:, - gzip-options:,hooks:,image-name:,interactive:,keyring-packages:,linux-flavours:,linux-packages:, + gzip-options:,image-name:,interactive:,keyring-packages:,linux-flavours:,linux-packages:, security:,updates:,backports:,binary-filesystem:,binary-images:, apt-indices:,bootappend-install:,bootappend-live:,bootappend-live-failsafe:,bootloader:,checksums:,compression:,config:,zsync:,build-with-chroot:, debian-installer:,debian-installer-distribution:,debian-installer-preseedfile:,debian-installer-gui:, @@ -443,11 +442,6 @@ Local_arguments () shift 2 ;; - --hooks) - LB_HOOKS="${2}" - shift 2 - ;; - --image-name) LIVE_IMAGE_NAME="${2}" shift 2 @@ -1127,10 +1121,6 @@ LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM}" # (Default: ${LB_UNION_FILESYSTEM}) LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM}" -# \$LB_HOOKS: set hook commands -# (Default: empty) -LB_HOOKS="${LB_HOOKS}" - # \$LB_INTERACTIVE: set interactive build # (Default: ${LB_INTERACTIVE}) LB_INTERACTIVE="${LB_INTERACTIVE}" @@ -1367,6 +1357,14 @@ then Echo_warning "Make sure you are using the newest version at all times." fi +for _HOOK in "${LIVE_BUILD}"/share/hooks/*.hook* /usr/share/live/build/hooks/*.hook* +do + if [ -e "${_HOOK}" ] && [ ! -e "config/hooks/$(basename ${_HOOK})" ] + then + ln -s "${_HOOK}" "config/hooks/$(basename ${_HOOK})" + fi +done + cat > config/build << EOF [Image] Architecture: ${LIVE_IMAGE_ARCHITECTURE} |