[Lunar-commits] r23049 - in lunar-tools/trunk: . installkernel

Auke Kok sofar at lunar-linux.org
Fri Jan 26 00:18:40 CET 2007


Author: sofar
Date: 2007-01-26 00:18:39 +0100 (Fri, 26 Jan 2007)
New Revision: 23049

Added:
   lunar-tools/trunk/installkernel/
   lunar-tools/trunk/installkernel/installkernel
Modified:
   lunar-tools/trunk/Makefile
Log:
Add installkernel binary!


Modified: lunar-tools/trunk/Makefile
===================================================================
--- lunar-tools/trunk/Makefile	2007-01-25 19:09:39 UTC (rev 23048)
+++ lunar-tools/trunk/Makefile	2007-01-25 23:18:39 UTC (rev 23049)
@@ -7,7 +7,8 @@
 # i.e. 2004.9 2004.10 2004.11 ...
 VERSION = 2006.1
 
-PROGRAMS = lids/lids luser/luser lnet/lnet lservices/lservices lmodules/lmodules clad/clad
+PROGRAMS = lids/lids luser/luser lnet/lnet lservices/lservices \
+	lmodules/lmodules clad/clad
 DOCS = README COPYING ChangeLog
 MANPAGES = lnet/lnet.8
 PROFILEDFILES = clad/clad.rc
@@ -20,30 +21,34 @@
 
 all:
 install:
+	if [ ! -d "/sbin" ] ; then \
+	    mkdir -p "/sbin" ; \
+	fi
+	install -m755 installkernel/installkernel /sbin/
 	if [ ! -d "${SBINDIR}" ] ; then \
 	    mkdir -p ${SBINDIR} ; \
-	fi ; \
+	fi
 	for PROGRAM in ${PROGRAMS} ; do \
-	    install -m755 $${PROGRAM} ${SBINDIR} ; \
-	done ; \
+	    install -m755 $${PROGRAM} ${SBINDIR}/ ; \
+	done
 	for MANPAGE in ${MANPAGES} ; do \
 	    EXT=`echo "$${MANPAGE:(($${#MANPAGE}-1)):1}"` ; \
 	    if [ ! -d "${MANDIR}man$$EXT" ] ; then \
 	        mkdir -p ${MANDIR}man$$EXT ; \
 	    fi ; \
 	    install -m644 $${MANPAGE} ${MANDIR}man$$EXT/ ; \
-	done ; \
+	done
 	if [ ! -d "${PROFILEDDIR}" ] ; then \
 	    mkdir -p ${PROFILEDDIR} ; \
-	fi ; \
+	fi
 	for RCFILE in ${PROFILEDFILES} ; do \
-	    install -m644 $${RCFILE} ${PROFILEDDIR} ; \
-	done ; \
+	    install -m644 $${RCFILE} ${PROFILEDDIR}/ ; \
+	done
 	if [ ! -d "${DOCDIR}" ] ; then \
 		mkdir -p ${DOCDIR} ; \
-	fi ; \
+	fi
 	for DOC in ${DOCS} ; do \
-		install -m644 $${DOC} ${DOCDIR} ; \
+		install -m644 $${DOC} ${DOCDIR}/ ; \
 	done
 
 log:

Added: lunar-tools/trunk/installkernel/installkernel
===================================================================
--- lunar-tools/trunk/installkernel/installkernel	                        (rev 0)
+++ lunar-tools/trunk/installkernel/installkernel	2007-01-25 23:18:39 UTC (rev 23049)
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+. /etc/lunar/config
+
+preserve()
+{
+	if [ -f $1 ] ; then
+		mv -f $1 $1.old
+	fi
+}
+
+# make backups
+preserve $4/$1
+preserve $4/System.map-$1
+preserve $4/config.$1
+
+make modules_install
+# bzImage
+cp $2 $4/$1
+# System.map
+cp $3 $4/System.map-$1
+# save config as .gz
+cp .config $4/config.$1
+gzip -f $4/config.$1
+
+# and update bootloader
+update_bootloader $1 $1
+
+[ $? == 2 ] && true
+


Property changes on: lunar-tools/trunk/installkernel/installkernel
___________________________________________________________________
Name: svn:executable
   + *



More information about the Lunar-commits mailing list