summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorMichael Neves2013-02-27 22:38:03 +0100
committerMichael Neves2013-02-27 22:38:03 +0100
commit718829eacc89ae66b184865cd6dd90d98c7706e8 (patch)
treee3aef412ba31c7b3ffd7cfba5594ae273fd58185 /server
parentadd aufs and squashfs to modules list for stage3.1 (diff)
downloadtm-scripts-718829eacc89ae66b184865cd6dd90d98c7706e8.tar.gz
tm-scripts-718829eacc89ae66b184865cd6dd90d98c7706e8.tar.xz
tm-scripts-718829eacc89ae66b184865cd6dd90d98c7706e8.zip
small fixes
Diffstat (limited to 'server')
-rwxr-xr-xserver/build_core18
1 files changed, 9 insertions, 9 deletions
diff --git a/server/build_core b/server/build_core
index 3ae9b5a1..33a23c5a 100755
--- a/server/build_core
+++ b/server/build_core
@@ -68,12 +68,11 @@ generate_rootfs() {
#check for kernel modules, if not present copy from system
if [ ! -d ${STAGE31_DIR}/lib/modules ];
then
- pinfo "Couldn't find kernel modules in stage3.1."
pinfo "Copying modules for kernel $(uname -r)..."
mkdir -p "${STAGE31_DIR}/lib/modules/$(uname -r)/kernel" || perror "Cannot create '${STAGE31_DIR}/lib/modules/$(uname -r)/kernel'"
cd /lib/modules/$(uname -r)/kernel || perror "No Directory /lib/modules/$(uname -r)/kernel found."
- tarcopy "$(cat stage31.modules)" "${STAGE31_DIR}/lib/modules/$(uname -r)/kernel"
- cd -
+ tarcopy "$(cat ${MODULE_DIR}/stage31.modules)" "${STAGE31_DIR}/lib/modules/$(uname -r)/kernel"
+ cd - >/dev/null
else
pinfo "Not copying kernel modules from system, as '${STAGE31_DIR}/lib/modules' already exists."
fi
@@ -81,15 +80,14 @@ generate_rootfs() {
#check for firmware, if not present copy from system
if [ ! -d ${STAGE31_DIR}/lib/firmware ];
then
- pinfo "Couldn't find firmware in stage3.1."
pinfo "Copying firmware for kernel $(uname -r)..."
mkdir -p "${STAGE31_DIR}/lib/firmware/$(uname -r)" || perror "Cannot create '${STAGE31_DIR}/lib/firmware/$(uname -r)'"
cd /lib/firmware || perror "No Directory /lib/firmware found."
- tarcopy "$(cat stage31.firmware)" "${STAGE31_DIR}/lib/firmware"
- cd -
+ tarcopy "$(cat ${MODULE_DIR}/stage31.firmware)" "${STAGE31_DIR}/lib/firmware"
+ cd - >/dev/null
cd /lib/firmware/$(uname -r) || perror "No Directory /lib/firmware/$(uname -r) found."
- tarcopy "$(cat stage31.firmware)" "${STAGE31_DIR}/lib/firmware/$(uname -r)"
- cd -
+ tarcopy "$(cat ${MODULE_DIR}/stage31.firmware)" "${STAGE31_DIR}/lib/firmware/$(uname -r)"
+ cd - >/dev/null
else
pinfo "Not copying firmware from system, as '${STAGE31_DIR}/lib/firmware' already exists."
fi
@@ -113,9 +111,11 @@ generate_stage31() {
generate_squashfs
if [ ! -e ${MODULE_DIR}/kernel ]; then
- pinfo "Couldn't find kernel in '${MODULE_DIR}'"
+ local TOOL_STR="$TOOL_STR copy_kernel:"
pinfo "Copying Kernel $(uname -r) to ${MODULE_DIR}/kernel"
cp "/boot/vmlinuz-$(uname -r)" "${MODULE_DIR}/kernel" || perror "Cannot copy kernel from '/boot/vmlinuz-$(uname -r)' to '${MODULE_DIR}/kernel'"
+ else
+ pinfo "Not copying kernel from system, as it already exists."
fi
}