Add serial console detection to core28 updater
authorArne Fitzenreiter <arne_f@ipfire.org>
Sat, 30 May 2009 21:59:18 +0000 (23:59 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 30 May 2009 21:59:18 +0000 (23:59 +0200)
config/rootfiles/core/28/update.sh
doc/packages-list.txt

index 16b254244f15dd9c1866c6e8f74d4a8fc29951b4..6ac9d133f908c7963d4d9b09b12a33a32851ad6c 100644 (file)
@@ -61,6 +61,10 @@ rm -rf /boot/ipfirerd-*
 rm -rf /boot/vmlinuz-*
 rm -rf /lib/modules/
 #
+# Backup grub.conf
+#
+cp -vf /boot/grub/grub.conf /boot/grub/grub.conf.org
+#
 # Unpack the updated files
 #
 echo
@@ -76,6 +80,16 @@ echo Update grub configuration ...
 sed -i "s|ROOT|$ROOT|g" /boot/grub/grub.conf
 sed -i "s|KVER|$KVER|g" /boot/grub/grub.conf
 sed -i "s|MOUNT|$MOUNT|g" /boot/grub/grub.conf
+
+if [ "$(grep "^serial" /boot/grub/grub.conf.org)" == "" ]; then
+       echo "grub use default console ..."
+else
+       echo "grub use serial console ..."
+       sed -i -e "s|splashimage|#splashimage|g" /boot/grub/grub.conf
+       sed -i -e "s|#serial|serial|g" /boot/grub/grub.conf
+       sed -i -e "s|#terminal|terminal|g" /boot/grub/grub.conf
+       sed -i -e "s| panic=10 | console=ttyS0,38400n8 panic=10 |g" /boot/grub/grub.conf
+fi
 #
 # Made emergency - initramdisk
 #
@@ -127,5 +141,5 @@ sed -i "s|$OLDVERSION|$NEWVERSION|g" /opt/pakfire/etc/pakfire.conf
 #
 # This core-update need a reboot
 /usr/bin/logger -p syslog.emerg -t core-upgrade-28 "Upgrade finished. If you use a customized grub.cfg"
-/usr/bin/logger -p syslog.emerg -t core-upgrade-28 "(eq. Serial Console or Custom Videomodes) Check it!"
+/usr/bin/logger -p syslog.emerg -t core-upgrade-28 "Check it before reboot !!!"
 /usr/bin/logger -p syslog.emerg -t core-upgrade-28 " *** Please reboot... *** "
index 24d45c5dd0c31b34395e7fc6a23ac7c09bf189ef..32c70d7867cf678f98580377780f14d559604954 100644 (file)
 * mtd-CVS-20070507
 * mtools-3.9.10
 * mysql-5.0.24a
-* nagios-3.0.5
+* nagios-3.0.6
 * nano-2.0.9
 * nasm-0.98.39
 * ncftp-3.2.1-src
 * ntp-4.2.4p7
 * ocaml-3.09.2
 * oinkmaster-2.0
+* open-vm-tools-2009.05.22-167859
 * openldap-2.3.20
 * openmailadmin-1.0.0
 * openssh-5.2p1