diff options
| author | Simon Rettberg | 2014-07-04 14:46:20 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2014-07-04 14:46:20 +0200 |
| commit | d1f5aedd76df437a08f3283fa00bc8a9dab7fa2b (patch) | |
| tree | 8c046eeaf8e874b479b95964b2bf410365cff438 /remote/includes/kernel.inc | |
| parent | remove hardcoded /bin/rm call. Relative calls work in services files (diff) | |
| download | tm-scripts-d1f5aedd76df437a08f3283fa00bc8a9dab7fa2b.tar.gz tm-scripts-d1f5aedd76df437a08f3283fa00bc8a9dab7fa2b.tar.xz tm-scripts-d1f5aedd76df437a08f3283fa00bc8a9dab7fa2b.zip | |
"Fedora Support", step 1 ->
Several changes:
1) Make sure /bin /sbin /lib and /lib64 are ALWAYS symlinks to /usr/XXX,
no matter what the current distribution does.
2) Make sure nobody and nogroup exist.
3) Fix various modules making assumptions that are not true on every
distro.
4) Add symlinks to kdm module since fedora is looking for kdmrc in
yet another spot.
5) Add detection of fedora, support its package manager
What still breaks: dnbd3
Other distros might not work now, they need adaption to changed logic
in some modules.
Diffstat (limited to 'remote/includes/kernel.inc')
| -rw-r--r-- | remote/includes/kernel.inc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/remote/includes/kernel.inc b/remote/includes/kernel.inc index dc7f7f12..3acb1810 100644 --- a/remote/includes/kernel.inc +++ b/remote/includes/kernel.inc @@ -28,9 +28,12 @@ get_kernel_version () { # set empty SYS_UTS_RELEASE and SYS_KERNEL SYS_UTS_RELEASE="(unknown)" SYS_KERNEL="$(echo "$SYS_UTS_RELEASE" | grep -o -E '^[0-9\.]+')" + # System kernel version + SYSTEM_KERNEL_LONG=$(uname -r) + SYSTEM_KERNEL_SHORT=$(grep -o -E '^[0-9\.]+' <<<$SYSTEM_KERNEL_LONG) } -check_kernel_base_dir() { +check_kernel_base_dir () { # check if KERNEL_BASE_DIR was set, if not we don't know # whether kernel-openslx or kernel-system has been built @@ -46,7 +49,7 @@ check_kernel_base_dir() { } -copy_kernel_modules() { +copy_kernel_modules () { pinfo "Copying kernel modules for kernel ${KERNEL_CURRENT_VERSION}..." [ -z "${REQUIRED_KERNEL_MODULES}" ] && perror "REQUIRED_KERNEL_MODULES is empty. Check your config file." [ -z "${KERNEL_HEADERS_PATH}" ] && perror "KERNEL_HEADERS_PATH is empty. Kernel headers appears to be missing." @@ -128,7 +131,7 @@ copy_kernel_modules() { cd "${OLD_DIR}" || perror "Could not cd back to ${OLD_DIR}." } -copy_firmware() { +copy_firmware () { pinfo "Copying firmware for kernel ${KERNEL_CURRENT_VERSION}..." [ -z "${REQUIRED_FIRMWARE}" ] && perror "REQUIRED_FIRMWARE is empty. Check your config file." @@ -205,7 +208,7 @@ copy_firmware() { cd "${OLD_DIR}" || perror "Could not cd back to ${OLD_DIR}." } -copy_kernel() { +copy_kernel () { check_kernel_base_dir local TOOL_STR="$TOOL_STR copy_kernel:" |
