diff options
-rw-r--r-- | helper/fileutil.inc | 14 | ||||
-rwxr-xr-x | mltk | 2 | ||||
-rw-r--r-- | remote/modules/vmplayer/vmplayer.build | 5 | ||||
-rwxr-xr-x | remote/rootfs/rootfs-stage31/data/init | 4 |
4 files changed, 20 insertions, 5 deletions
diff --git a/helper/fileutil.inc b/helper/fileutil.inc index fcb551eb..fb1c8382 100644 --- a/helper/fileutil.inc +++ b/helper/fileutil.inc @@ -25,6 +25,16 @@ install_package() { # copy list of files using tar tarcopy () { + if [ $# -gt 0 -a "x$1" == "x-i" ]; then + shift + local IGNORE_ERROR="--ignore-failed-read" + else + local IGNORE_ERROR= + fi + if [ "x$IGNORE_TAR_ERROR" != "x" ]; then + unset IGNORE_TAR_ERROR + IGNORE_ERROR="--ignore-failed-read" + fi [ $# -ne 2 ] && perror "Sanity check failed: tarcopy needs exactly two params, but $# were given." local FROM=$(trim "$1") local TO=$(trim "$2") @@ -37,9 +47,9 @@ tarcopy () { [ -z "$TO" ] && perror "tarcopy called with empty destination." [ ! -d "$TO" ] && { mkdir -p "$TO" || perror "could not create destination "$TO" for tar-copy."; } # TODO count files copied? would remove the need to do it everywhere :) - tar -cpP $FROM | tar -xp -C "$TO" 2> /dev/null + tar $IGNORE_ERROR -cpP $FROM | tar -xp -C "$TO" 2> /dev/null local PS=(${PIPESTATUS[*]}) - [ "x${PS[0]}" != "x0" ] && perror "packing-part of tar-copy from '$SHORT' to '$TO' failed. (${PS[0]})" + [ "x$IGNORE_ERROR" == "x" -a "x${PS[0]}" != "x0" ] && perror "packing-part of tar-copy from '$SHORT' to '$TO' failed. (${PS[0]})" [ "x${PS[1]}" != "x0" ] && perror "unpacking-part of tar-copy from '$SHORT' to '$TO' failed. (${PS[1]})" } @@ -20,6 +20,8 @@ SELF="$(readlink -f $0)" ROOT_DIR="$(dirname "${SELF}")" MLTK_PID="$$" +# Required: m4 make gcc g++ binutils + # Make apt-get install non-interactive when it comes to postinstall questions # ie. kdm asking which dm you want to set as default export DEBIAN_FRONTEND=noninteractive diff --git a/remote/modules/vmplayer/vmplayer.build b/remote/modules/vmplayer/vmplayer.build index 70143a7e..e2c830c0 100644 --- a/remote/modules/vmplayer/vmplayer.build +++ b/remote/modules/vmplayer/vmplayer.build @@ -87,6 +87,7 @@ build_modules() { [ -e "/etc/vmware/config" ] && cp "/etc/vmware/config" "/etc/vmware/config.mltk.bak" + mkdir -p "/etc/vmware" || perror "Could not create /etc/vmware" cat > "/etc/vmware/config" << EOF .encoding = "UTF-8" installerDefaults.componentDownloadEnabled = "yes" @@ -135,7 +136,9 @@ EOF pinfo "KOMPALIERE VMWARE KERNEL MODULE" for MOD in vsock vmblock vmmon vmnet vmci; do pinfo "Kompaliere $MOD" - "$VMWARE_MODCONFIG" --console --build-mod -k "$UTS_RELEASE $MOD" "$(which gcc)" "$MODULES_DIR/kernel/ksrc/include" "vmplayer" "$MOD" + [ -s "/lib/modules/$UTS_RELEASE/vmplayer/$MOD.ko" ] && unlink "/lib/modules/$UTS_RELEASE/vmplayer/$MOD.ko" + "$VMWARE_MODCONFIG" --console --build-mod -k "$UTS_RELEASE" "$MOD" "$(which gcc)" "$MODULES_DIR/kernel/ksrc/include" "vmplayer" "$MOD" + [ ! -s "/lib/modules/$UTS_RELEASE/vmplayer/$MOD.ko" ] && perror "Error compiling via $VMWARE_MODCONFIG" done cd - diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init index 32903439..4268e6af 100755 --- a/remote/rootfs/rootfs-stage31/data/init +++ b/remote/rootfs/rootfs-stage31/data/init @@ -92,9 +92,9 @@ fi echo "Building aufs..." mv /mnt/modprobing /dev/shm/uniontmp #mount -t overlayfs -o lowerdir=/rorootfs,upperdir=/dev/shm/uniontmp overlayfs /mnt -mount -n -t aufs -o br:/dev/shm/uniontmp:/rorootfs=ro none /mnt +mount -n -t aufs -o br:/dev/shm/uniontmp:/rorootfs=ro none /mnt || { echo "Problem building aufs."; drop_shell; } mkdir -p /mnt/uniontmp /mnt/tmp -mount -n --move /dev/shm/uniontmp /mnt/uniontmp +mount -n --move /dev/shm/uniontmp /mnt/uniontmp || { echo "Problem moving uniontmp."; drop_shell; } # create udev rule for nic we booted from echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="'$MAC'", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"' > "/mnt/etc/udev/rules.d/70-net-boot-nic-name.rules" |