/[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.10 by slords, Sat Jul 9 20:20:39 2005 UTC Revision 1.11 by slords, Thu Jul 14 21:22:39 2005 UTC
# Line 42  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 -en "\n\nConverting 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 69  if [ $found -gt "0" ] ; then Line 69  if [ $found -gt "0" ] ; then
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 "Checking filesystems on converted partitions. This may take a few minutes." >/dev/tty1          echo -e "\nChecking filesystems on converted partitions. This may take a few minutes." >/dev/tty1
         echo -n "Checking filesystems..." >/dev/tty1  
73    
74          mkdir /mnt/tmp          mkdir /mnt/tmp
75          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
76              if [ "$part" != "$swap" ]; then              if [ "$part" != "$swap" ]; then
77                  # Resize ext2/3 partitions (fix superblock - part 2)                  # Resize ext2/3 partitions (fix superblock - part 2)
78                  echo -n "$part..." >/dev/tty1                  echo -e "\n\nChecking $part..." >/dev/tty1
79                  e2fsck -f $part                  e2fsck -f -C0 $part >/dev/tty1
80    
81                  # Check for /etc/fstab on partitions and convert entries                  # Check for /etc/fstab on partitions and convert entries
82                  mount $part /mnt/tmp                  mount $part /mnt/tmp
# Line 88  if [ $found -gt "0" ] ; then Line 87  if [ $found -gt "0" ] ; then
87                  umount /mnt/tmp                  umount /mnt/tmp
88              fi              fi
89          done          done
         echo "done" >/dev/tty1  
90          rmdir /mnt/tmp          rmdir /mnt/tmp
91          mdadm --stop --scan          mdadm --stop --scan
92      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