aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--initscripts.spec6
-rwxr-xr-xrc.d/rc.sysinit42
-rw-r--r--src/Makefile3
-rw-r--r--src/mkkerneldoth46
4 files changed, 54 insertions, 43 deletions
diff --git a/initscripts.spec b/initscripts.spec
index fcafca77..28c49142 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -1,6 +1,6 @@
Summary: The inittab file and the /etc/init.d scripts.
Name: initscripts
-Version: 5.82
+Version: 5.83
Copyright: GPL
Group: System Environment/Base
Release: 1
@@ -232,6 +232,7 @@ rm -rf $RPM_BUILD_ROOT
%config /etc/profile.d/lang.sh
%config /etc/profile.d/lang.csh
/usr/sbin/sys-unconfig
+/sbin/mkkerneldoth
/sbin/setsysfont
/bin/doexec
/bin/ipcalc
@@ -254,6 +255,9 @@ rm -rf $RPM_BUILD_ROOT
%ghost %attr(0664,root,utmp) /var/run/utmp
%changelog
+* Sat Apr 7 2001 Preston Brown <pbrown@redhat.com>
+- broke out kernel.h updater from rc.sysinit into /sbin/mkkerneldoth
+
* Tue Apr 3 2001 Bill Nottingham <notting@redhat.com>
- set umask explicitly to 022 in /etc/init.d/functions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 261ee762..6564fc7f 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -651,47 +651,7 @@ if grep -q "ide-scsi" /proc/cmdline ; then
fi
# Generate a header that defines the boot kernel.
-KERNEL_TYPE=`uname -r | sed 's_^[^se]*\(\|smp\|enterprise\)$_-\1_;s_^-$__'`
-KERNEL_RELEASE=`uname -r | sed 's|smp\|enterprise||g'`
-
-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
- ENTERPRISE='0'
- SMP='0'
- UP='0'
- case "$KERNEL_TYPE" in
- -smp) SMP='1';;
- -enterprise) ENTERPRISE='1';;
- *) UP='1';;
- esac
- cat > /boot/kernel.h << EOF
-/* This file is automatically generated at boot time. */
-#ifndef __BOOT_KERNEL_H_
-#define __BOOT_KERNEL_H_
-
-/* Kernel type $KERNEL_ARCH$KERNEL_TYPE */
-
-#ifndef __MODULE_KERNEL_$KERNEL_ARCH
-#define __MODULE_KERNEL_$KERNEL_ARCH 1
-#endif
-
-#ifndef __BOOT_KERNEL_ENTERPRISE
-#define __BOOT_KERNEL_ENTERPRISE $ENTERPRISE
-#endif
-
-#ifndef __BOOT_KERNEL_SMP
-#define __BOOT_KERNEL_SMP $SMP
-#endif
-
-#ifndef __BOOT_KERNEL_UP
-#define __BOOT_KERNEL_UP $UP
-#endif
-
-#endif
-EOF
-fi
+/sbin/mkkerneldoth
# Adjust symlinks as necessary in /boot to keep system services from
# spewing messages about mismatched System maps and so on.
diff --git a/src/Makefile b/src/Makefile
index 32d87b9b..9e642e6e 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,7 +1,7 @@
CFLAGS+=$(RPM_OPT_FLAGS) -Wall -D_GNU_SOURCE
PROGS=usernetctl doexec netreport testd usleep ipcalc initlog minilogd \
- getkey ppp-watch consoletype
+ getkey ppp-watch consoletype mkkerneldoth
PPPWATCH_OBJS=ppp-watch.o shvar.o
INITLOG_OBJS=initlog.o process.o
USLEEP_OBJS=usleep.o
@@ -34,6 +34,7 @@ install:
install -m 644 ipcalc.1 $(ROOT)$(mandir)/man1
install -m 644 consoletype.1 $(ROOT)$(mandir)/man1
install -m 644 initlog.conf $(ROOT)/etc
+ install -m 755 mkkerneldoth $(ROOT)/sbin
# this daemon and initscript are useful for testing the up/down/status stuff
# not installed by default, only comes from sources.
diff --git a/src/mkkerneldoth b/src/mkkerneldoth
new file mode 100644
index 00000000..ff205e18
--- /dev/null
+++ b/src/mkkerneldoth
@@ -0,0 +1,46 @@
+#!/bin/bash
+#
+# Generate a header that defines the boot kernel.
+#
+
+KERNEL_TYPE=`uname -r | sed 's_^[^se]*\(\|smp\|enterprise\)$_-\1_;s_^-$__'`
+KERNEL_RELEASE=`uname -r | sed 's|smp\|enterprise||g'`
+
+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
+ ENTERPRISE='0'
+ SMP='0'
+ UP='0'
+ case "$KERNEL_TYPE" in
+ -smp) SMP='1';;
+ -enterprise) ENTERPRISE='1';;
+ *) UP='1';;
+ esac
+ cat > /boot/kernel.h << EOF
+/* This file is automatically generated at boot time. */
+#ifndef __BOOT_KERNEL_H_
+#define __BOOT_KERNEL_H_
+
+/* Kernel type $KERNEL_ARCH$KERNEL_TYPE */
+
+#ifndef __MODULE_KERNEL_$KERNEL_ARCH
+#define __MODULE_KERNEL_$KERNEL_ARCH 1
+#endif
+
+#ifndef __BOOT_KERNEL_ENTERPRISE
+#define __BOOT_KERNEL_ENTERPRISE $ENTERPRISE
+#endif
+
+#ifndef __BOOT_KERNEL_SMP
+#define __BOOT_KERNEL_SMP $SMP
+#endif
+
+#ifndef __BOOT_KERNEL_UP
+#define __BOOT_KERNEL_UP $UP
+#endif
+
+#endif
+EOF
+fi