diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:48 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:18:28 +0100 |
commit | 799d4bfb31c279b72088c8ee8a16c2710ab8a309 (patch) | |
tree | 4bbc1758ceaa46c5e81fe9d66ccdaacfec047ef8 /helpers/lh_chroot_hacks | |
parent | 677415f6d7efc1e5b888570d70af311d2900c69c (diff) | |
download | vyos-live-build-799d4bfb31c279b72088c8ee8a16c2710ab8a309.tar.gz vyos-live-build-799d4bfb31c279b72088c8ee8a16c2710ab8a309.zip |
Adding live-helper 1.0~a3-1.
Diffstat (limited to 'helpers/lh_chroot_hacks')
-rwxr-xr-x | helpers/lh_chroot_hacks | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/helpers/lh_chroot_hacks b/helpers/lh_chroot_hacks index 2b08283e8..942222653 100755 --- a/helpers/lh_chroot_hacks +++ b/helpers/lh_chroot_hacks @@ -1,6 +1,11 @@ #!/bin/sh # lh_chroot_hacks(1) - execute hacks in chroot +# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org> +# +# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +# This is free software, and you are welcome to redistribute it +# under certain conditions; see COPYING for details. set -e @@ -10,6 +15,13 @@ do . ${FUNCTION} done +# Set static variables +DESCRIPTION="execute hacks in chroot" +HELP="" +USAGE="${PROGRAM} [--force]" + +Arguments "${@}" + # Reading configuration files Read_conffile config/common Read_conffile config/chroot @@ -32,32 +44,37 @@ rm -f chroot/etc/udev/rules.d/z25_persistent-net.rules case "${LIVE_BINARY_IMAGE}" in net) - case "${LH_APT}" in - apt|apt-get) - Chroot "apt-get install --yes smbfs" - ;; + if [ ! -f chroot/usr/bin/smbmount ] + then + case "${LH_APT}" in + apt|apt-get) + Chroot "apt-get install --yes smbfs" + ;; - aptitude) - Chroot "aptitude install --assume-yes smbfs" - ;; - esac + aptitude) + Chroot "aptitude install --assume-yes smbfs" + ;; + esac + fi if [ ! -d chroot/etc/initramfs-tools ] then mkdir chroot/etc/initramfs-tools fi - - # Configuring initramfs for NFS + if [ ! "`grep 'MODULES=netboot' chroot/etc/initramfs-tools/initramfs.conf`" ] + then + # Configuring initramfs for NFS cat >> chroot/etc/initramfs-tools/initramfs.conf << EOF MODULES=netboot BOOT=nfs NFSROOT=auto EOF + fi ;; esac # Update initramfs -Chroot "update-initramfs -tu" +Chroot "update-initramfs -k all -t -u" # Creating stage file Create_stagefile .stage/chroot_hacks |