CVS: moonbase/kernel/linux-stable POST_INSTALL,1.6,1.7
elaine at lunar-linux.org
elaine at lunar-linux.org
Fri Oct 3 04:26:30 GMT 2003
Update of /var/cvs/lunar/moonbase/kernel/linux-stable
In directory dbguin.lunar-linux.org:/tmp/cvs-serv26314
Modified Files:
POST_INSTALL
Log Message:
Added lilo and grub edits for .old kernels
Index: POST_INSTALL
===================================================================
RCS file: /var/cvs/lunar/moonbase/kernel/linux-stable/POST_INSTALL,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- POST_INSTALL 1 Sep 2003 15:42:53 -0000 1.6
+++ POST_INSTALL 3 Oct 2003 04:26:28 -0000 1.7
@@ -8,9 +8,19 @@
EOF
-
}
+lilo_old_image_entry() {
+
+ cat << EOF
+
+image = /boot/stable_bz-$VERSION.old
+ label = old-stable-$VERSION
+ read-only
+
+
+EOF
+}
grub_image_entry() {
@@ -18,7 +28,7 @@
cat << EOF
-title linux-$VERSION
+title stable-$VERSION
kernel $GRUB_BOOT/stable_bz-$VERSION
root $GRUB_ROOT
@@ -26,9 +36,26 @@
}
+grub_old_image_entry() {
+
+. $DEPENDS_CONFIG/grub
+
+ cat << EOF
+
+title old-stable-$VERSION
+kernel $GRUB_BOOT/stable_bz-$VERSION.old
+root $GRUB_ROOT
+
+EOF
+
+}
+
+
update_lilo() {
- if ! grep -q "stable-$VERSION" /etc/lilo.conf; then
+
+ if ! ( grep -q "stable-$VERSION" /etc/lilo.conf &&
+ grep -q "stable-$VERSION.old" /etc/lilo.conf); then
IFS_OLD=$IFS
export IFS="
@@ -44,7 +71,12 @@
if echo $LINE | grep -q "image" ||
echo $LINE | grep -q "other" ; then
if (( IMAGE_COUNT == 0 )); then
- echo -e "`lilo_image_entry`" >> /etc/lilo.conf.new
+ if ! grep -q "stable-$VERSION" /etc/lilo.conf; then
+ echo -e "`lilo_image_entry`" >> /etc/lilo.conf.new
+ fi
+ if ! grep -q "stable-$VERSION.old" /etc/lilo.conf; then
+ echo -e "`lilo_old_image_entry`" >> /etc/lilo.conf.new
+ fi
fi
(( IMAGE_COUNT++ ))
fi
@@ -77,7 +109,9 @@
update_grub() {
- if ! grep -q "stable-$VERSION" /boot/grub/menu.lst; then
+
+if ! ( grep -q "stable-$VERSION" /boot/grub/menu.lst &&
+ grep -q "stable-$VERSION.old" /boot/grub/menu.lst ); then
IFS_OLD=$IFS
export IFS="
@@ -92,7 +126,12 @@
if echo $LINE | grep -q "title"; then
if (( IMAGE_COUNT == 0 )); then
- echo -e "`grub_image_entry`" >> /boot/grub/menu.lst.new
+ if ! grep -q "stable-$VERSION" /boot/grub/menu.lst; then
+ echo -e "`grub_image_entry`" >> /boot/grub/menu.lst.new
+ fi
+ if ! grep -q "stable-$VERSION.old" /boot/grub/menu.lst; then
+ echo -e "`grub_old_image_entry`" >> /boot/grub/menu.lst.new
+ fi
fi
(( IMAGE_COUNT++ ))
fi
More information about the Lunar-commits
mailing list