I've been trying to tar.gz a dir with out any luck :-( tryed all sorts of
syntax but have not go it right yet . I'm actualy trying to tar.gz the
following script and dirs
I been keeping track of kernal makes and boots with the follow script we
hacked together.
makes new kernal then moves old one on boot old,safe or new
#!/bin/sh
# sum peeps makez0r appz dat go b00m!
# this one simply recompiles the kernel in just one step...
# ;-) ambii and toffer
# defines
LIBDIR="/kernels"
SRCDIR="/usr/src/linux"
KRNDIR="arch/i386/boot/zImage"
# initialization
DATE=`date +%d.%m.%Y`
cd ${SRCDIR}
# nice, colourful little ncurses ;-)
make menuconfig
# or traditional, b&w style :-P
# make config
# save the config file just in case
cp ${SRCDIR}/.config ${LIBDIR}/config/${DATE}
# now do your strut
make dep 1> ${LIBDIR}/logs/${DATE}.dep1 2> ${LIBDIR}/logs/${DATE}.dep2 &
make clean 1> ${LIBDIR}/logs/${DATE}.clean1 2> ${LIBDIR}/logs/${DATE}.clean2 &
make zImage 1> ${LIBDIR}/logs/${DATE}.zImage1 2> ${LIBDIR}/logs/${DATE}.zImage2 &
# check the above named compiled o.k.
checkwork()
# back up previous kernel
cp ${LIBDIR}/main ${LIBDIR}/last
# finishing up
rm -rf ${LIBDIR}/main
cp ${SRCDIR}/{$KRNDIR} ${LIBDIR}/${DATE}
ln -s ${LIBDIR}/${DATE} ${LIBDIR}/main
# update the bootstrap
lilo
# reboot?
checkarg()
#
# functions
#
# add if statement here! if exit status is non-zero for "make zImage" then
# quit, and email watchdog@shoalhaven.com
checkwork() {
if [ ! "$?" == "0" ]
then
echo -n "Error compiling kernel. Please check \
logs in:\n${LIBDIR}/logs/\n"
exit 1
else
echo -n"Kernel compilation complete.\n"
fi
}
# a bit of fun
checkarg() {
if [ "$1" == "-r" ]
then
reboot;
fi
}
you need a kernal dir
drwxr-xr-x 3 root root 1024 May 3 14:01 ./
drwxr-xr-x 4 root root 1024 May 14 15:31 ../
-r-------- 1 root root 495651 May 3 12:18 3.5.1998
-r-------- 1 root root 500570 May 3 12:18 3c905-TX
drwx------ 2 root root 1024 May 8 10:43 config/
-r-------- 1 root root 356 May 3 12:33 index.txt
-r-------- 1 root root 500570 May 3 13:27 last
lrwxrwxrwx 1 root root 8 May 14 15:31 main -> 3.5.1998
lrwxrwxrwx 1 root root 7 May 14 15:31 orig -> vmlinuz
lrwxrwxrwx 1 root root 8 May 14 15:31 safe -> 3c905-TX
-r-------- 1 root root 461067 Jan 5 09:20 vmlinuz
-r-------- 1 root root 490424 Jan 19 10:05 zImage
lilo.conf lines
#
# ------------------------------------------------------------------------
# LILO configuration file
# ------------------------------------------------------------------------
boot = /dev/hda
#compact # faster, but won't work on all systems.
prompt # Pass arguments onto the kernel.
timeout = 100 # Continue with boot after 10 seconds...
vga = normal # force sane state
ramdisk = 0 # paranoia setting
# End LILO global section
# Linux bootable partition config begins
image = /zImage
root = /dev/hda2
label = Linux
read-only
# Linux bootable partition config ends
# Linux old partition config begins
image = /zImage.old
root = /dev/hda2
label = OldLinux
read-only
# Linux bootable partition config ends
# Linux SAFE partition config begins
image = /vmlinuz
root = /dev/hda2
label = Safe
read-only
# Linux SAFE partition config ends
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
chris@shoalhaven.com http://chris.flatearth.com.au
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu