diff options
author | Bernhard Rosenkraenzer <bero@redhat.com> | 2001-08-15 13:55:29 +0000 |
---|---|---|
committer | Bernhard Rosenkraenzer <bero@redhat.com> | 2001-08-15 13:55:29 +0000 |
commit | 34b597c1e15e048e7335c862278d61ac3dc34891 (patch) | |
tree | 2b246b8a9ff3511b4ff0885a7de4af60fb9f0eb8 /src/mkkerneldoth.s390 | |
parent | 243c161b2abefe887f2ff9b044d997322d757f98 (diff) | |
download | initscripts-34b597c1e15e048e7335c862278d61ac3dc34891.tar initscripts-34b597c1e15e048e7335c862278d61ac3dc34891.tar.gz initscripts-34b597c1e15e048e7335c862278d61ac3dc34891.tar.bz2 initscripts-34b597c1e15e048e7335c862278d61ac3dc34891.tar.xz initscripts-34b597c1e15e048e7335c862278d61ac3dc34891.zip |
S390 fixes
Diffstat (limited to 'src/mkkerneldoth.s390')
-rwxr-xr-x | src/mkkerneldoth.s390 | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/src/mkkerneldoth.s390 b/src/mkkerneldoth.s390 index 137c15ec..d6629d95 100755 --- a/src/mkkerneldoth.s390 +++ b/src/mkkerneldoth.s390 @@ -3,19 +3,38 @@ # Generate a header that defines the boot kernel. # -KVER=`uname -r | sed 's/[^a-zA-Z]//g'` +KERNEL_TYPE=`uname -r | sed 's_^.*\(tape\)$_-\1_;t;s_.*__;'` +KERNEL_RELEASE=`uname -r | sed 's|tape||g'` -cat > /boot/kernel.h << EOF -/* This file is automatically generated at boot time. */ +rpm -q kernel$KERNEL_TYPE-$KERNEL_RELEASE >/dev/null 2>&1 && KERNEL_ARCH=`rpm -q --qf '%{ARCH}' kernel$KERNEL_TYPE-$KERNEL_RELEASE 2>/dev/null` || KERNEL_ARCH=`uname -m` +OLD_KERNEL_ARCH_TYPE=`sed -n 's_^/\* Kernel type \(.*\) \*/_\1_p' /boot/kernel.h 2>/dev/null` +if [ -n "$KERNEL_ARCH" -a "$KERNEL_ARCH$KERNEL_TYPE" != "$OLD_KERNEL_ARCH_TYPE" ]; then + TAPE='0' + VM='0' + case "$KERNEL_TYPE" in + -tape) TAPE='1';; + *) VM='1';; + esac + cat > /boot/kernel.h << EOF +/* This file is automatically generated at boot time. */ #ifndef __BOOT_KERNEL_H_ #define __BOOT_KERNEL_H_ -#define __BOOT_KERNEL_vrdr 0 -#define __BOOT_KERNEL_tape 0 +/* Kernel type $KERNEL_ARCH$KERNEL_TYPE */ + +#ifndef __MODULE_KERNEL_$KERNEL_ARCH +#define __MODULE_KERNEL_$KERNEL_ARCH 1 +#endif -#undef __BOOT_KERNEL_$KVER -#define __BOOT_KERNEL_$KVER 1 +#ifndef __BOOT_KERNEL_TAPE +#define __BOOT_KERNEL_TAPE $TAPE +#endif + +#ifndef __BOOT_KERNEL_VM +#define __BOOT_KERNEL_VM $VM +#endif #endif EOF +fi |