From 11f048bc8c54e09025db9d2e6d7f70ce32e03f3f Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Thu, 21 Nov 2013 16:57:20 -0600 Subject: [PATCH] qemu: add some warnings... Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- scripts/chroot.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/chroot.sh b/scripts/chroot.sh index 77505181d..8f395d297 100755 --- a/scripts/chroot.sh +++ b/scripts/chroot.sh @@ -134,6 +134,7 @@ check_defines if [ "x${host_arch}" != "xarmv7l" ] ; then sudo cp $(which qemu-arm-static) ${tempdir}/usr/bin/ + warn_qemu_will_fail=1 fi echo "Log: Running: debootstrap second-stage in [${tempdir}]" @@ -398,6 +399,13 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__ echo "Log: (chroot) package [\${pkg}] was not installed... (add to base_pkg_list if functionality is really needed)" } + qemu_warning () { + if [ "${warn_qemu_will_fail}" ] ; then + echo "Log: (chroot) Warning, qemu can fail here... (run on real armv7l hardware for production images)" + echo "Log: (chroot): [\${qemu_command}]" + fi + } + stop_init () { cat > /usr/sbin/policy-rc.d <<EOF #!/bin/sh @@ -614,6 +622,8 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__ if [ "x\${pkg_is_not_installed}" = "x" ] ; then mkdir -p /opt/boot-scripts/ || true + qemu_command="git clone git://github.com/RobertCNelson/boot-scripts.git /opt/boot-scripts/ || true" + qemu_warning git clone git://github.com/RobertCNelson/boot-scripts.git /opt/boot-scripts/ || true chown -R ${user_name}:${user_name} /opt/boot-scripts/ else @@ -631,10 +641,14 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__ if [ "x${release}" = "xwheezy" ] ; then apt-get -y -t wheezy-backports install nodejs-legacy + qemu_command="curl https://npmjs.org/install.sh | sh" + qemu_warning curl https://npmjs.org/install.sh | sh mkdir -p /opt/cloud9/ || true - clone git clone https://github.com/ajaxorg/cloud9.git /opt/cloud9/ || true + qemu_command="git clone https://github.com/ajaxorg/cloud9.git /opt/cloud9/ || true" + qemu_warning + git clone https://github.com/ajaxorg/cloud9.git /opt/cloud9/ || true chown -R ${user_name}:${user_name} /opt/cloud9/ fi else -- GitLab