/[smeserver]/cdrom.image/upgrade.cfg
ViewVC logotype

Diff of /cdrom.image/upgrade.cfg

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.3 by gordonr, Wed Jul 6 22:44:29 2005 UTC Revision 1.8 by slords, Sat Jul 9 18:57:26 2005 UTC
# Line 1  Line 1 
1  upgrade  upgrade
2  text  text
3  cdrom  cdrom
4    skipx
5    mouse
6    network --device eth0 --bootproto dhcp
7    rootpw --iscrypted $1$iHhL195i$25OY88oyw2bxgU47MvuZf0
8    firewall --disabled
9    selinux --permissive
10    authconfig --enableshadow --enablemd5
11  bootloader --location=mbr  bootloader --location=mbr
12  zerombr yes  zerombr yes
13    
# Line 9  zerombr yes Line 16  zerombr yes
16  sleep 2  sleep 2
17  /sbin/e-smith/signal-event post-upgrade  /sbin/e-smith/signal-event post-upgrade
18    
19  # HACK - fix selinux config  # Make SELinux rescan filesystems on reboot
20  perl -p -i -e 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config  touch /.autorelabel
21    
22  %pre  %pre
23  #!/bin/sh  #!/bin/sh
# Line 35  if [ $found -gt "0" ] ; then Line 42  if [ $found -gt "0" ] ; then
42    
43      # Check if we have any ext2/3 or swap partitions      # Check if we have any ext2/3 or swap partitions
44      if grep -q 'Id=8[23]' /tmp/oldparts; then      if grep -q 'Id=8[23]' /tmp/oldparts; then
45          echo -n "Converting partitions to RAID..." >/dev/tty1          echo -n "Converting partitions to RAID..." >/dev/tty1
46          # Convert ext2/3 and swap partitions to raid autodetect          # Convert ext2/3 and swap partitions to raid autodetect
47          sed 's/Id=8[32]/Id=fd/' /tmp/oldparts > /tmp/newparts          sed 's/Id=8[32]/Id=fd/' /tmp/oldparts > /tmp/newparts
48    
# Line 46  if [ $found -gt "0" ] ; then Line 53  if [ $found -gt "0" ] ; then
53          for part in `grep 'Id=8[23]' /tmp/oldparts | sed 's/ :.*//'`; do          for part in `grep 'Id=8[23]' /tmp/oldparts | sed 's/ :.*//'`; do
54              mdpart=`echo $part | sed "s/$disk\([0-9]\+\)/md\1/"`              mdpart=`echo $part | sed "s/$disk\([0-9]\+\)/md\1/"`
55                    
56              echo -n "$part..." >/dev/tty1              echo -n "$part..." >/dev/tty1
57              mdadm --create $mdpart --run --level=1 --raid-devices=2 $part missing              mdadm --create $mdpart --run --level=1 --raid-devices=2 $part missing
58              if [ "$mdpart" == "$swap" ]; then              if [ "$mdpart" == "$swap" ]; then
59                  # Recreate swap partition                  # Recreate swap partition
# Line 57  if [ $found -gt "0" ] ; then Line 64  if [ $found -gt "0" ] ; then
64              fi              fi
65          done          done
66    
67          echo "done" >/dev/tty1          echo "done" >/dev/tty1
68    
69          # Write out new converted partition table          # Write out new converted partition table
70          sfdisk --force /dev/$disk < /tmp/newparts          sfdisk --force /dev/$disk < /tmp/newparts
71    
72          echo -n "Running fsck on converted partitions..." >/dev/tty1          echo "Checking filesystems on converted partitions. This may take a few minutes." >/dev/tty1
73            echo -n "Checking filesystems..." >/dev/tty1
74    
75          mkdir /mnt/tmp          mkdir /mnt/tmp
76          for part in `grep 'Id=fd' /tmp/newparts | sed "s/$disk\([0-9]\+\) :.*/md\1/"`; do          for part in `grep 'Id=fd' /tmp/newparts | sed "s/$disk\([0-9]\+\) :.*/md\1/"`; do
77              if [ "$part" != "$swap" ]; then              if [ "$part" != "$swap" ]; then
78                  # Resize ext2/3 partitions (fix superblock - part 2)                  # Resize ext2/3 partitions (fix superblock - part 2)
79                  echo -n "$part..." >/dev/tty1                  echo -n "$part..." >/dev/tty1
80                  e2fsck -f $part                  e2fsck -f $part
81    
82                  # Check for /etc/fstab on partitions and convert entries                  # Check for /etc/fstab on partitions and convert entries
# Line 80  if [ $found -gt "0" ] ; then Line 88  if [ $found -gt "0" ] ; then
88                  umount /mnt/tmp                  umount /mnt/tmp
89              fi              fi
90          done          done
91          echo "done" >/dev/tty1          echo "done" >/dev/tty1
92          rmdir /mnt/tmp          rmdir /mnt/tmp
93          mdadm --stop --scan          mdadm --stop --scan
94      fi      fi


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed