Add serial console detection to core28 updater

This commit is contained in:
Arne Fitzenreiter
2009-05-30 23:59:18 +02:00
parent 884bb2d4ab
commit f5e44b937f
2 changed files with 17 additions and 2 deletions

View 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... *** "

View File

@@ -218,7 +218,7 @@
* 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
@@ -235,6 +235,7 @@
* 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