]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Updater: convert extrahd entries to uuid.
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 19 Dec 2010 22:22:18 +0000 (23:22 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 19 Dec 2010 22:22:18 +0000 (23:22 +0100)
config/rootfiles/core/44/update.sh

index ba3c80a3593de282ec82759bc33519647e1b2e41..97416ce47f573b3b263211b6ac12bf0317918de4 100644 (file)
@@ -179,6 +179,19 @@ grep -v "reply_body_max_size 0" > /var/ipfire/proxy/squid.conf
 echo >> /var/ipfire/proxy/squid.conf
 echo error_directory /etc/squid/errors >> /var/ipfire/proxy/squid.conf
 
+#Convert extrahd entries to UUID
+cp -f /var/ipfire/extrahd/devices /var/ipfire/extrahd/devices.org
+while read entry
+do
+       device=`echo $entry | cut -f1 -d";"`
+       uuid=`blkid  -c /dev/null -s UUID -o value /dev/$device`
+       if [ ! -z $uuid ]; then
+               sed -i -e "s|$device|UUID=$uuid|g" /var/ipfire/extrahd/devices
+               sed -i -e "s|/dev/$device|UUID=$uuid|g" /var/ipfire/extrahd/fstab
+               sed -i -e "s|/dev/$device|UUID=$uuid|g" /etc/fstab
+       fi
+done < /var/ipfire/extrahd/devices.org
+
 #
 # Start services
 #