summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
authorJonathan Bauer2014-03-24 13:33:50 +0100
committerJonathan Bauer2014-03-24 13:33:50 +0100
commit1cd79f3f4738df9085238f4d755dd7a5e9dbdded (patch)
tree5159ee55237ee1e2ee914fc6c34e105413ccd336 /remote
parent[packagemanager] improve list_content_packages function (diff)
parent[vmware.build] Ahem, forgot to re-comment debugging bash (diff)
downloadtm-scripts-1cd79f3f4738df9085238f4d755dd7a5e9dbdded.tar.gz
tm-scripts-1cd79f3f4738df9085238f4d755dd7a5e9dbdded.tar.xz
tm-scripts-1cd79f3f4738df9085238f4d755dd7a5e9dbdded.zip
Merge branch 'master' of git://git.openslx.org/openslx-ng/tm-scripts
Diffstat (limited to 'remote')
-rw-r--r--remote/includes/chroot.inc7
-rw-r--r--remote/modules/vmware/vmware.build3
2 files changed, 6 insertions, 4 deletions
diff --git a/remote/includes/chroot.inc b/remote/includes/chroot.inc
index f0940bba..fc9738ec 100644
--- a/remote/includes/chroot.inc
+++ b/remote/includes/chroot.inc
@@ -50,8 +50,8 @@ chroot_prepare_dirs() {
chroot_prepare_mounts() {
# first mount / on CHROOT_BINDDIR and remount read-only
- mount -o bind "${CHROOT_LOWERDIR}" "${CHROOT_BINDDIR}" || perror "Could not bind-mount '$CHROOT_LOWERDIR' to '$CHROOT_BINDDIR'."
- mount -o remount,ro "${CHROOT_BINDDIR}" || perror "Could not remount '$CHROOT_BINDDIR' read-only."
+ mount -o bind "${CHROOT_LOWERDIR}" "${CHROOT_BINDDIR}" || perror "Could not bind-mount '$CHROOT_LOWERDIR' to '$CHROOT_BINDDIR'."
+ mount -o remount,ro,bind "${CHROOT_BINDDIR}" || perror "Could not remount '$CHROOT_BINDDIR' read-only."
# check that it really is read-only
[ "x$(mount | grep -E "^/ on ${CHROOT_BINDDIR}" | grep -v '\(.*ro.*\)')" != "x" ] && perror "'${CHROOT_BINDDIR}' is not read-only! Aborting..."
@@ -72,7 +72,7 @@ chroot_gen_autoexec() {
# create the script to be automatically executed.
cat >"${CHROOT_MOUNTDIR}/autoexec.bat"<<-EOF
#!/bin/bash
- echo "chroot success."
+ echo "chroot started successfully."
EOF
# dump the piped input to it
@@ -128,6 +128,7 @@ chroot_run() {
chroot_gen_autoexec || perror "'chroot_gen_autoexec' failed with $?."
# do the chroot
+ exec 0>&8
chroot --userspec root:root "${CHROOT_MOUNTDIR}" /autoexec.bat
local RET=$?
if [ "$RET" -eq 0 ]; then
diff --git a/remote/modules/vmware/vmware.build b/remote/modules/vmware/vmware.build
index 8636f335..c1dd77ce 100644
--- a/remote/modules/vmware/vmware.build
+++ b/remote/modules/vmware/vmware.build
@@ -21,16 +21,17 @@ fetch_source() {
}
build() {
-
# prepare the build directory with the files needed during the chroot
cp "${MODULE_DIR}/src/$VMWARE_BUNDLE_FILE" "${MODULE_BUILD_DIR}/$VMWARE_BUNDLE_FILE"
cp -r "${MODULE_DIR}/patches" "${MODULE_BUILD_DIR}"
pinfo "Installing vmware per chroot..."
chroot_run "${MODULE_BUILD_DIR}" <<-EOF
+ # PS1='\[\e[1;33m\](chroot) \u@\h:\w\$ \[\e[1;32m\]' /bin/bash -norc # un-comment for debugging within chroot
yes | sh /"${VMWARE_BUNDLE_FILE}" --eulas-agreed --console --required
vmware-modconfig --console --build-mod -k "${SYS_UTS_RELEASE}" vmnet $(which gcc) "${MODULES_DIR}"/kernel/ksrc/include/ vmplayer vmnet
vmware-modconfig --console --build-mod -k "${SYS_UTS_RELEASE}" vmmon $(which gcc) "${MODULES_DIR}"/kernel/ksrc/include/ vmplayer vmmon
+ # PS1='\[\e[1;33m\](chroot) \u@\h:\w\$ \[\e[1;32m\]' /bin/bash -norc # un-comment for debugging within chroot
EOF
# cleanup unneeded files