summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-03-05 17:11:12 +0000
committerThierry Vignaud <tv@mageia.org>2013-03-05 17:11:12 +0000
commit2c4de4708c98b63083055f7e1dc93941527dfc0b (patch)
tree4f5ed9ab6e31ed0252e2cb1a472574b1b1c24e06
parent588955f71ae18a2b13d493e69326bdc279e4e20f (diff)
downloadbootloader-utils-2c4de4708c98b63083055f7e1dc93941527dfc0b.tar
bootloader-utils-2c4de4708c98b63083055f7e1dc93941527dfc0b.tar.gz
bootloader-utils-2c4de4708c98b63083055f7e1dc93941527dfc0b.tar.bz2
bootloader-utils-2c4de4708c98b63083055f7e1dc93941527dfc0b.tar.xz
bootloader-utils-2c4de4708c98b63083055f7e1dc93941527dfc0b.zip
drop obsolete kheader initscript, not used by kernel since 2.6.22-6mdv (mdv#52803)
-rw-r--r--Makefile15
-rw-r--r--NEWS1
-rwxr-xr-xkheader.pl163
3 files changed, 5 insertions, 174 deletions
diff --git a/Makefile b/Makefile
index c232922..639ae25 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,11 @@
PL=rebootin
SH_FILES=detectloader installkernel installkernel.sysconfig kernel_remove_initrd
-SH=$(SH_FILES) kheader
+SH=$(SH_FILES)
MAN=rebootin.8 detectloader.8
-FROMPERLFILES=kheader
ARCH=$(shell uname -m)
UTILS = bootloader-utils.spec Makefile
-FILES = $(PL) $(SH_FILES) $(MAN) $(UTILS) $(FROMPERLFILES:%=%.pl)
+FILES = $(PL) $(SH_FILES) $(MAN) $(UTILS)
PACKAGE=bootloader-utils
VERSION=1.16
@@ -16,7 +15,7 @@ SVN_URL := $(shell svn info | sed -n '/^URL[^:]*: *\(.*\)/s//\1/p')
SVNROOT := $(shell dirname $(SVN_URL))
SVNCOPY = $(SVN_URL)
-all: $(FROMPERLFILES) check
+all: check
check:
@for i in $(SH);do /bin/bash -n $$i || exit 1;echo $$i syntax OK;done
@@ -32,15 +31,9 @@ install: check
install -m755 kernel_remove_initrd $(ROOT)/sbin/
install -m644 installkernel.sysconfig $(ROOT)/etc/sysconfig/installkernel
install -m755 rebootin detectloader $(ROOT)/usr/sbin/
- install -m755 kheader $(ROOT)/etc/rc.d/init.d/kheader
-
-$(FROMPERLFILES) : %: %.pl
- rm -f $@
- perl $< > $@
- chmod a-w $@
clean:
- rm -f *~ $(FROMPERLFILES) $(PACKAGE)-*.tar.bz2
+ rm -f *~ $(PACKAGE)-*.tar.bz2
# rules to build a test dist
diff --git a/NEWS b/NEWS
index ed76c45..7fced4f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+- drop obsolete kheader initscript, not used by kernel since 2.6.22-6mdv
- installkernel:
o drop support for kernel-BOOT (long dead)
diff --git a/kheader.pl b/kheader.pl
deleted file mode 100755
index 8dbf935..0000000
--- a/kheader.pl
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/usr/bin/perl
-
-use MDK::Common;
-
-my @kernels = group_by2(
- 'smp' => 'SMP',
- 'xen0' => 'XEN0',
- 'default' => 'DEFAULT',
- 'legacy' => 'LEGACY',
- 'enterprise' => 'ENTERPRISE',
- 'secure' => 'SECURE',
- '-i686-up-4GB' => 'I686_UP_4GB',
- '-i686-up-64GB' => 'I686_UP_64GB',
- '-p3-smp-64GB' => 'P3_SMP_64GB',
- '-i586-up-1GB' => 'I586_UP_1GB',
-
- 'desktop' => 'DESKTOP',
- 'desktopsmp' => 'DESKTOPSMP',
- 'desktop-i586' => 'DESKTOP_I586',
- 'desktopsmp-i586' => 'DESKTOPSMP_I586',
- 'laptop' => 'LAPTOP',
- 'laptopsmp' => 'LAPTOPSMP',
- 'server' => 'SERVER',
- 'serversmp' => 'SERVERSMP',
-
- '*' => 'UP', #- keep it the last
-);
-
-my $init_vars = join(';', map { "$_->[1]=0" } @kernels);
-
-my $set_vars = join('',
- map {
- <<EOF
- $_->[0])
- $_->[1]=1;;
-EOF
- } @kernels);
-
-
-my $defines = join("\n",
- map {
- <<EOF
-#ifndef __BOOT_KERNEL_$_->[1]
-#define __BOOT_KERNEL_$_->[1] \$$_->[1]
-#endif
-EOF
- } @kernels);
-
-printf(<<'KHEADER', $init_vars, $set_vars, $defines);
-#!/bin/sh
-# (c) Mandriva, Pixel <pixel@mandriva.com>
-# $Id: kheader.pl 84121 2006-11-14 16:12:11Z pixel $
-#
-# kheader: Regenerates kernel headers
-#
-# chkconfig: 235 95 20
-# description: This shell script regenerates the /boot/kernel.h header for \
-# /usr/src/linux/include/{autoconf,version}.h
-#
-### BEGIN INIT INFO
-# Provides: kheader
-# Default-Start: 2 3 5
-# Short-Description: Regenerates kernel headers
-# Description: This shell script regenerates the /boot/kernel.h header for
-# /usr/src/linux/include/{autoconf,version}.h
-### END INIT INFO
-
-. /etc/rc.d/init.d/functions
-
-: ${KERNEL_H:=/boot/kernel.h}
-: ${HEADERFILE:=${KERNEL_H}-`uname -r`}
-[ -d $(dirname $HEADERFILE) ] || exit 0
-
-table() {
- %s
-
- # this will do the trick until gprintf.py expands variables
- echo_no_gprintf="echo"
-
- ver=$(uname -r)
- mdk="md[kv]"
- k=$($echo_no_gprintf $ver|sed "s/.*$mdk//")
-
- # for tmb & multimedia kernels
- case $ver in
- *-desktop-*)
- k=desktop$k;;
- *-laptop-*)
- k=laptop$k;;
- *-server-*)
- k=server$k;;
- esac
-
- case $k in
-%s
- esac
-
- # since 2.6.17-2mdv, default kernels can be SMP enabled by
- # default, hence a new name
- $echo_no_gprintf "$UP:$ver" | grep -q "^1:.*$mdk" && {
- case $ver in
- # XXX simpler to maintain a skip list
- [01].*|2.[0-5].*|2.6.[0-9]-*|2.6.1[0-6]-*|2.6.17-1mdk);;
- *) UP=0; DEFAULT=1;;
- esac
- }
-
- unset echo_no_gprintf
-}
-
-generate () {
- table;
- # do not overwrite exsisting header, it confuses
- # kernel make and forces it to recompile everything
- cat > $HEADERFILE.tmp << EOF
-/* This file is automatically generated at boot time. */
-#ifndef __BOOT_KERNEL_H_
-#define __BOOT_KERNEL_H_
-
-%s
-#endif
-EOF
-
-mv -f $HEADERFILE.tmp $HEADERFILE
-
-if [ -f $KERNEL_H ] ; then
- rm -f $KERNEL_H
-fi
-
-ln -sf $HEADERFILE $KERNEL_H
-}
-
-function remove_orphaned {
- local version= i=
- for i in /boot/kernel.h-* /boot/System.map-* /boot/config-*; do
- version=${i#*-}
- [[ -f /boot/vmlinuz-${version} ]] || rm -f ${i}
- done
-}
-
-case $1 in
- start)
- # We don't log this command, because most users don't want to hear this (c) Chmou
- generate
- touch /var/lock/subsys/kheader
- ;;
- restart)
- ;;
- reload)
- generate
- ;;
- stop)
- remove_orphaned;
- rm -f /var/lock/subsys/kheader
- ;;
- status)
- ;;
- *)
- gprintf "Usage: %%s\n" "$(basename $0) {start|stop|reload|restart}"
- exit 0
- ;;
-esac
-KHEADER